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

Fix:
w . shutdown ( ) ;
Buggy code:
public class EmailAddressValidator extends PatternValidator { private static final long serialVersionUID = 1L ; private static final EmailAddressValidator INSTANCE = new EmailAddressValidator ( ) ; public static EmailAddressValidator getInstance ( ) { } protected EmailAddressValidator ( ) { } protected String resourceKey ( ) { <START_BUG> return "EmailAddressPatternValidator" ; <END_BUG> } }

Fix:
return "EmailAddressValidator" ;
Buggy code:
public class Gameplatform { private static GomokuPlay game = null ; public static void main ( String [ ] args ) { System . out . println ( "~~~~~~~<seq2seq4repair_space>Welcome<seq2seq4repair_space>~~~~~~~~<seq2seq4repair_space>" ) ; ChessGameDirector director = new ChessGameDirector ( ) ; ChessGameBuilder builder = new GomokuGameBuilder ( ) ; <START_BUG> director . construct ( builder , 2 , 9000 ) ; <END_BUG> Gameplatform . game = builder . getChessGame ( ) ; Gameplatform . game . start ( ) ; System . out . println ( "~~~~~~~<seq2seq4repair_space>game<seq2seq4repair_space>finished<seq2seq4repair_space>~~~~~~~~<seq2seq4repair_space>" ) ; } }

Fix:
director . construct ( builder , 2 , 60000 ) ;
Buggy code:
public class Plugin { private static final String NAME_LESSON_SOLUTION_DIRECTORY = "lessonSolutions" ; private static final String NAME_LESSON_PLANS_DIRECTORY = "lessonPlans" ; private static final String NAME_LESSON_I18N_DIRECTORY = "i18n" ; private final Logger logger = LoggerFactory . getLogger ( Plugin . class ) ; private final Path pluginDirectory ; private Class < AbstractLesson > lesson ; private Map < String , File > solutionLanguageFiles = new HashMap < > ( ) ; private Map < String , File > lessonPlansLanguageFiles = new HashMap < > ( ) ; private File lessonSourceFile ; public static class PluginLoadingFailure extends RuntimeException { public PluginLoadingFailure ( String message ) { } public PluginLoadingFailure ( String message , Exception e ) { } } public Plugin ( Path pluginDirectory ) { } public void loadClasses ( Map < String , byte [ ] > classes ) { } private void loadClass ( String name , byte [ ] classFile ) { } public void loadFiles ( List < Path > files , boolean reload ) { } private void copyProperties ( boolean reload , Path file ) { } private Path createPropertiesDirectory ( ) throws IOException { if ( Files . exists ( pluginDirectory . resolve ( Plugin . NAME_LESSON_I18N_DIRECTORY ) ) ) { return pluginDirectory . resolve ( Plugin . NAME_LESSON_I18N_DIRECTORY ) ; } else { <START_BUG> return Files . createDirectory ( pluginDirectory . resolve ( Plugin . NAME_LESSON_I18N_DIRECTORY ) ) ; <END_BUG> } } public void rewritePaths ( Path pluginTarget ) { } public AbstractLesson getLesson ( ) { } public Optional < File > getLessonSolution ( String language ) { } public Map < String , File > getLessonSolutions ( ) { } public Optional < File > getLessonSource ( ) { } public Map < String , File > getLessonPlans ( ) { } }

Fix:
return Files . createDirectories ( pluginDirectory . resolve ( Plugin . NAME_LESSON_I18N_DIRECTORY ) ) ;
Buggy code:
public class PreferencesFragment extends PreferenceFragment { private Activity activity ; private PackageInfo packageInfo ; private static ThumbnailsDatabase thumbnailsDatabase ; private SharedPreferences mSharedPreferences ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onStart ( ) { } private void markVersionNumber ( ) { } private void markCacheCountsAndSize ( ) { } private void setCacheEnabled ( boolean status ) { } private void updateAndMarkFontsPath ( ) { } private void setCustomFontsEnabled ( boolean status ) { } private void setSyncNotifyEnabled ( boolean flag ) { } private void setSaveThumbnailsEnabled ( boolean status ) { } @ Override public boolean onPreferenceTreeClick ( PreferenceScreen prefScreen , Preference pref ) { } private void startActivityForFontResult ( String title , int flag ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { if ( data != null ) { final Uri uri = data . getData ( ) ; try { <START_BUG> final File file = FileUtils . getFile ( uri ) ; <END_BUG> switch ( requestCode ) { case string . key_custom_fonts : case string . key_custom_fonts_bold : SharedPreferences . Editor editor = mSharedPreferences . edit ( ) ; editor . putString ( getString ( requestCode ) , file . getAbsolutePath ( ) ) ; editor . commit ( ) ; break ; } } catch ( Exception e ) { Log . e ( "FileSelectorTestActivity" , "File<seq2seq4repair_space>select<seq2seq4repair_space>error" , e ) ; } } updateAndMarkFontsPath ( ) ; super . onActivityResult ( requestCode , resultCode , data ) ; } @ Override public void onDestroy ( ) { } }

Fix:
final File file = FileUtils . getFile ( getActivity ( ) , uri ) ;
Buggy code:
public class Cell { private AgentClass agent = null ; private Set < Neighborhood > neighborhood = new HashSet < Neighborhood > ( ) ; private final int x ; private final int y ; public Cell ( int x , int y , Neighborhood n ) { } public Cell ( int x , int y , Neighborhood n , AgentClass agent ) { } public boolean setAgent ( AgentClass agent ) { } public AgentClass getAgent ( ) { } public int [ ] getCoordinates ( ) { } public boolean isEmpty ( ) { <START_BUG> if ( ( this . agent ) != null ) { <END_BUG> return true ; } else { return false ; } } public boolean isConsumer ( ) { } public boolean isBanker ( ) { } }

Fix:
if ( ( this . agent ) == null ) {
Buggy code:
public class TaskListActivity extends AstridActivity implements MainMenuListener { public static final String TOKEN_SELECTED_FILTER = "selectedFilter" ; private View listsNav ; private ImageView listsNavDisclosure ; private TextView lists ; private ImageView mainMenu ; private ImageView commentsButton ; private FragmentPopover listsPopover ; private FragmentPopover editPopover ; private FragmentPopover commentsPopover ; private MainMenuPopover mainMenuPopover ; private final OnClickListener mainMenuClickListener = new OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ; private final OnClickListener popupMenuClickListener = new OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ; private final OnClickListener commentsButtonClickListener = new OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ; private final OnDismissListener editPopoverDismissListener = new OnDismissListener ( ) { @ Override public void onDismiss ( ) { } } ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } protected void initializeFragments ( ActionBar actionBar ) { } private void createListsPopover ( ) { } private void createEditPopover ( ) { } private void createCommentsPopover ( ) { } private void createMainMenuPopover ( ) { } private void setupPopoverWithFragment ( FragmentPopover popover , Fragment frag , LayoutParams params ) { } public void setupPopoverWithFilterList ( FilterListFragment fla ) { } @ Override public void onTaskListItemClicked ( long taskId ) { } @ Override public boolean onFilterItemClicked ( FilterListItem item ) { } private void setListsDropdownSelected ( boolean selected ) { } @ Override protected void onPostResume ( ) { } public void setListsTitle ( String title ) { } @ Override protected void onPause ( ) { } public void setSelectedItem ( Filter item ) { } @ Override public void onBackPressed ( ) { } @ Override public void finish ( ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { if ( ( ( requestCode == ( FilterListFragment . REQUEST_NEW_LIST ) ) || ( requestCode == ( FilterListFragment . REQUEST_NEW_FILTER ) ) ) && ( resultCode == ( Activity . RESULT_OK ) ) ) { Filter newList = data . getParcelableExtra ( TOKEN_NEW_FILTER ) ; if ( newList != null ) { <START_BUG> getIntent ( ) . putExtra ( TOKEN_FILTER , newList ) ; <END_BUG> FilterListFragment fla = getFilterListFragment ( ) ; if ( fla != null ) fla . clear ( ) ; } } super . onActivityResult ( requestCode , resultCode , data ) ; } @ Override public void mainMenuItemSelected ( int item ) { } }

Fix:
onFilterItemClicked ( newList ) ;
Buggy code:
class LocalOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final LocalOutboundConnectionAdd INSTANCE = new LocalOutboundConnectionAdd ( ) ; static ModelNode getAddOperation ( final String connectionName , final String outboundSocketBindingRef , final Map < String , String > connectionCreationOptions ) { if ( ( connectionName == null ) || ( connectionName . trim ( ) . isEmpty ( ) ) ) { throw new IllegalArgumentException ( "Connection<seq2seq4repair_space>name<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null<seq2seq4repair_space>or<seq2seq4repair_space>empty" ) ; } if ( ( outboundSocketBindingRef == null ) || ( outboundSocketBindingRef . trim ( ) . isEmpty ( ) ) ) { throw new IllegalArgumentException ( ( "Outbound<seq2seq4repair_space>socket<seq2seq4repair_space>binding<seq2seq4repair_space>reference<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null<seq2seq4repair_space>or<seq2seq4repair_space>empty<seq2seq4repair_space>for<seq2seq4repair_space>connection<seq2seq4repair_space>named<seq2seq4repair_space>" + connectionName ) ) ; } final ModelNode addOperation = new ModelNode ( ) ; addOperation . get ( OP ) . set ( ADD ) ; final PathAddress address = PathAddress . pathAddress ( PathElement . pathElement ( SUBSYSTEM , SUBSYSTEM_NAME ) , PathElement . pathElement ( LOCAL_OUTBOUND_CONNECTION , connectionName ) ) ; addOperation . get ( OP_ADDR ) . set ( address . toModelNode ( ) ) ; addOperation . get ( OUTBOUND_SOCKET_BINDING_REF ) . set ( outboundSocketBindingRef ) ; if ( connectionCreationOptions != null ) { for ( final Map . Entry < String , String > entry : connectionCreationOptions . entrySet ( ) ) { if ( ( entry . getKey ( ) ) == null ) { continue ; } <START_BUG> addOperation . get ( CONNECTION_CREATION_OPTIONS ) . set ( entry . getKey ( ) , entry . getValue ( ) ) ; <END_BUG> } } return addOperation ; } private LocalOutboundConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController installRuntimeService ( OperationContext context , String connectionName , ModelNode outboundConnection , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { } }

Fix:
addOperation . get ( CONNECTION_CREATION_OPTIONS ) . add ( entry . getKey ( ) , entry . getValue ( ) ) ;
Buggy code:
public class Snippet95 { public static void main ( String [ ] args ) { final Display display = new Display ( ) ; final Shell shell = new Shell ( display ) ; shell . setText ( "Widget" ) ; shell . setBounds ( 10 , 10 , 200 , 200 ) ; final Table table = new Table ( shell , SWT . MULTI ) ; table . setLinesVisible ( true ) ; table . setBounds ( 10 , 10 , 100 , 100 ) ; for ( int i = 0 ; i < 9 ; i ++ ) { new TableItem ( table , SWT . NONE ) . setText ( ( "item" + i ) ) ; } Button button = new Button ( shell , SWT . PUSH ) ; button . setText ( "Capture" ) ; button . setBounds ( 10 , 140 , 50 , 20 ) ; button . addListener ( Selection , new Listener ( ) { public void handleEvent ( Event event ) { Point tableSize = table . getSize ( ) ; GC gc = new GC ( table ) ; final Image image = new Image ( display , tableSize . x , tableSize . y ) ; gc . copyArea ( image , 0 , 0 ) ; gc . dispose ( ) ; Shell popup = new Shell ( shell ) ; popup . setText ( "Image" ) ; popup . setBounds ( 50 , 50 , 200 , 200 ) ; popup . addListener ( Close , new Listener ( ) { <START_BUG> public void handleEvent ( Event event ) { <END_BUG> image . dispose ( ) ; } } ) ; Canvas canvas = new Canvas ( popup , SWT . NONE ) ; canvas . setBounds ( 10 , 10 , 150 , 150 ) ; canvas . addPaintListener ( new PaintListener ( ) { public void paintControl ( PaintEvent e ) { e . gc . drawImage ( image , 0 , 0 ) ; } } ) ; popup . open ( ) ; } } ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
public void handleEvent ( Event e ) {
Buggy code:
public class GameFragment extends Fragment { public GameFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public class FetchWeatherTask extends AsyncTask < String , Void , Void > { private final String LOG_TAG = GameFragment . FetchWeatherTask . class . getSimpleName ( ) ; @ Override protected Void doInBackground ( String ... postal ) { HttpURLConnection urlConnection = null ; BufferedReader reader = null ; String forecastJsonStr = null ; try { Uri . Builder weatherUri = new Uri . Builder ( ) ; <START_BUG> weatherUri . scheme ( "http" ) . authority ( "api.openweathermap.org" ) . appendPath ( "data" ) . appendPath ( "2.5" ) . appendPath ( "Forecast" ) . appendPath ( "daily?" ) . appendQueryParameter ( "q" , postal [ 0 ] ) . appendQueryParameter ( "mode" , "JSON" ) . appendQueryParameter ( "units" , "metric" ) . appendQueryParameter ( "cnt" , "7" ) . build ( ) ; <END_BUG> URL url = new URL ( "http:////api.openweathermap.org//data//2.5//forecast//daily?q=94043&mode=json&units=metric&cnt=7" ) ; Log . v ( LOG_TAG , ( "Built<seq2seq4repair_space>Uri:" + ( weatherUri . toString ( ) ) ) ) ; urlConnection = ( ( HttpURLConnection ) ( url . openConnection ( ) ) ) ; urlConnection . setRequestMethod ( "GET" ) ; urlConnection . connect ( ) ; InputStream inputStream = urlConnection . getInputStream ( ) ; StringBuffer buffer = new StringBuffer ( ) ; if ( inputStream == null ) { return null ; } reader = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { buffer . append ( ( line + "\n" ) ) ; } if ( ( buffer . length ( ) ) == 0 ) { return null ; } forecastJsonStr = buffer . toString ( ) ; Log . v ( LOG_TAG , ( "JSON<seq2seq4repair_space>String:" + forecastJsonStr ) ) ; } catch ( IOException e ) { Log . e ( "GameFragment" , "Error<seq2seq4repair_space>" , e ) ; forecastJsonStr = null ; } finally { if ( urlConnection != null ) { urlConnection . disconnect ( ) ; } if ( reader != null ) { try { reader . close ( ) ; } catch ( final IOException e ) { Log . e ( "GameFragment" , "Error<seq2seq4repair_space>closing<seq2seq4repair_space>stream" , e ) ; } } } return null ; } } }

Fix:
weatherUri . scheme ( "http" ) . authority ( "api.openweathermap.org" ) . appendPath ( "data" ) . appendPath ( "2.5" ) . appendPath ( "Forecast" ) . appendPath ( "daily" ) . appendQueryParameter ( "q" , postal [ 0 ] ) . appendQueryParameter ( "mode" , "JSON" ) . appendQueryParameter ( "units" , "metric" ) . appendQueryParameter ( "cnt" , "7" ) . build ( ) ;
Buggy code:
final class BcelMethod extends ResolvedMember { private Method method ; private boolean isAjSynthetic ; private ShadowMunger associatedShadowMunger ; private EffectiveSignatureAttribute effectiveSignature ; private MethodDeclarationLineNumberAttribute declarationLineNumber ; private ResolvedTypeX [ ] resolvedAnnotations ; private World world ; BcelMethod ( BcelObjectType declaringType , Method method ) { } private void unpackJavaAttributes ( ) { } private void unpackAjAttributes ( World world ) { <START_BUG> List as = BcelAttributes . readAjAttributes ( method . getAttributes ( ) , getSourceContext ( world ) , world . getMessageHandler ( ) ) ; <END_BUG> for ( Iterator iter = as . iterator ( ) ; iter . hasNext ( ) ; ) { AjAttribute a = ( ( AjAttribute ) ( iter . next ( ) ) ) ; if ( a instanceof AjAttribute . MethodDeclarationLineNumberAttribute ) { declarationLineNumber = ( ( AjAttribute . MethodDeclarationLineNumberAttribute ) ( a ) ) ; } else if ( a instanceof AjAttribute . AdviceAttribute ) { associatedShadowMunger = ( ( AjAttribute . AdviceAttribute ) ( a ) ) . reify ( this , world ) ; return ; } else if ( a instanceof AjAttribute . AjSynthetic ) { isAjSynthetic = true ; } else if ( a instanceof AjAttribute . EffectiveSignatureAttribute ) { effectiveSignature = ( ( AjAttribute . EffectiveSignatureAttribute ) ( a ) ) ; } else { throw new org . aspectj . weaver . BCException ( ( "weird<seq2seq4repair_space>method<seq2seq4repair_space>attribute<seq2seq4repair_space>" + a ) ) ; } } associatedShadowMunger = null ; } public boolean isAjSynthetic ( ) { } public ShadowMunger getAssociatedShadowMunger ( ) { } public EffectiveSignatureAttribute getEffectiveSignature ( ) { } public boolean hasDeclarationLineNumberInfo ( ) { } public int getDeclarationLineNumber ( ) { } public ISourceLocation getSourceLocation ( ) { } public Kind getKind ( ) { } public boolean hasAnnotation ( TypeX ofType ) { } public ResolvedTypeX [ ] getAnnotationTypes ( ) { } }

Fix:
List as = BcelAttributes . readAjAttributes ( getDeclaringType ( ) . getClassName ( ) , method . getAttributes ( ) , getSourceContext ( world ) , world . getMessageHandler ( ) ) ;
Buggy code:
public class JspcTest extends BuildFileTest { private File baseDir ; private File outDir ; private static final String TASKDEFS_DIR = "src//etc//testcases//taskdefs//optional//" ; public JspcTest ( String name ) { } public void setUp ( ) { configureProject ( ( ( JspcTest . TASKDEFS_DIR ) + "jspc.xml" ) ) ; <START_BUG> baseDir = new File ( JspcTest . TASKDEFS_DIR ) ; <END_BUG> outDir = new File ( baseDir , "jsp//java" ) ; } public void tearDown ( ) { } public void testSimple ( ) throws Exception { } public void testUriroot ( ) throws Exception { } public void testXml ( ) throws Exception { } public void testKeyword ( ) throws Exception { } public void testInvalidClassname ( ) throws Exception { } public void testNoTld ( ) throws Exception { } public void testNotAJspFile ( ) throws Exception { } protected void executeJspCompile ( String target , String javafile ) throws Exception { } protected void assertJavaFileCreated ( String filename ) throws Exception { } protected File getOutputFile ( String subpath ) { } public void testJasperNameManglerSelection ( ) { } public void testJasper41 ( ) { } protected void assertMapped ( JspMangler mangler , String filename , String classname ) { } }

Fix:
baseDir = new File ( System . getProperty ( "root" ) , JspcTest . TASKDEFS_DIR ) ;
Buggy code:
public class SubjectController implements DocumentListener { SubjectView view ; ComposerModel model ; public SubjectController ( ComposerModel model ) { } public void installListener ( ) { } public void updateComponents ( boolean b ) { } public boolean checkState ( ) { String subject = model . getHeaderField ( "Subject" ) ; if ( ( subject . length ( ) ) == 0 ) { <START_BUG> subject = new String ( MailResourceLoader . getString ( "menu" , "mainframe" , "composer_no_subject" ) ) ; <END_BUG> SubjectDialog dialog = new SubjectDialog ( ) ; dialog . showDialog ( subject ) ; if ( ( dialog . success ( ) ) == true ) subject = dialog . getSubject ( ) ; model . setHeaderField ( "Subject" , subject ) ; } return true ; } public void insertUpdate ( DocumentEvent e ) { } public void removeUpdate ( DocumentEvent e ) { } public void changedUpdate ( DocumentEvent e ) { } }

Fix:
subject = new String ( MailResourceLoader . getString ( "dialog" , "composer" , "composer_no_subject" ) ) ;
Buggy code:
public class ZipFileSet extends FileSet { private File srcFile = null ; private String prefix = "" ; private String fullpath = "" ; private boolean hasDir = false ; public void setDir ( File dir ) throws BuildException { } public void setSrc ( File srcFile ) { } public File getSrc ( ) { } public void setPrefix ( String prefix ) { } public String getPrefix ( ) { } public void setFullpath ( String fullpath ) { } public String getFullpath ( ) { } public DirectoryScanner getDirectoryScanner ( Project p ) { if ( isReference ( ) ) { return getRef ( p ) . getDirectoryScanner ( p ) ; } if ( ( srcFile ) != null ) { ZipScanner zs = new ZipScanner ( ) ; zs . setSrc ( srcFile ) ; <START_BUG> super . setDir ( new File ( "." ) ) ; <END_BUG> setupDirectoryScanner ( zs , p ) ; zs . init ( ) ; return zs ; } else { return super . getDirectoryScanner ( p ) ; } } }

Fix:
super . setDir ( p . getBaseDir ( ) ) ;
Buggy code:
public class CustomControlExample extends ControlExample { public CustomControlExample ( Composite parent ) { } Tab [ ] createTabs ( ) { } public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; CustomControlExample instance = new CustomControlExample ( shell ) ; shell . setText ( getResourceString ( "custom.window.title" ) ) ; <START_BUG> setShellSize ( display , shell ) ; <END_BUG> shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } instance . dispose ( ) ; } }

Fix:
setShellSize ( shell ) ;
Buggy code:
public class VmMobileApp extends Application { private static final String PROPERTY_ID = "UA-58276442-1" ; public static int GENERAL_TRACKER = 0 ; public enum TrackerName { APP_TRACKER ; } HashMap < VmMobileApp . TrackerName , Tracker > mTrackers = new HashMap < VmMobileApp . TrackerName , Tracker > ( ) ; public VmMobileApp ( ) { } synchronized Tracker getTracker ( VmMobileApp . TrackerName trackerId ) { if ( ! ( mTrackers . containsKey ( trackerId ) ) ) { GoogleAnalytics analytics = GoogleAnalytics . getInstance ( this ) ; <START_BUG> analytics . setLocalDispatchPeriod ( 15 ) ; <END_BUG> Tracker t = ( trackerId == ( VmMobileApp . TrackerName . APP_TRACKER ) ) ? analytics . newTracker ( VmMobileApp . PROPERTY_ID ) : null ; if ( t != null ) { t . enableExceptionReporting ( true ) ; t . enableAdvertisingIdCollection ( true ) ; t . setAnonymizeIp ( true ) ; } else { Log . i ( "ANALYTICS" , "Tracker<seq2seq4repair_space>equals<seq2seq4repair_space>null" ) ; } mTrackers . put ( trackerId , t ) ; } return mTrackers . get ( trackerId ) ; } }

Fix:
analytics . setLocalDispatchPeriod ( 2 ) ;
Buggy code:
public class SaveService { private static XStream saver = new XStream ( ) ; private static Logger log = LoggingManager . getLoggerForClass ( ) ; static String version = "1.0" ; static String propertiesVersion = "" ; private static final String PROPVERSION = "1.7" ; private static void makeAlias ( String alias , String clazz ) { } private static void initProps ( ) { } public static void saveTree ( HashTree tree , Writer writer ) throws Exception { } public static void saveElement ( Object el , Writer writer ) throws Exception { } public static Object loadElement ( InputStream in ) throws Exception { } public static Object loadElement ( Reader in ) throws Exception { } public static synchronized void saveSampleResult ( SampleResult res , Writer writer ) throws Exception { } public static synchronized void saveTestElement ( TestElement elem , Writer writer ) throws Exception { } static boolean versionsOK = true ; private static final String REVPFX = "$Revision:<seq2seq4repair_space>" ; private static final String REVSFX = "<seq2seq4repair_space>$" ; private static String extractVersion ( String rev ) { } private static void checkVersion ( Class clazz , String expected ) { } private static void checkVersions ( ) { SaveService . versionsOK = true ; SaveService . checkVersion ( BooleanPropertyConverter . class , "1.4" ) ; SaveService . checkVersion ( HashTreeConverter . class , "1.2" ) ; SaveService . checkVersion ( IntegerPropertyConverter . class , "1.3" ) ; SaveService . checkVersion ( LongPropertyConverter . class , "1.3" ) ; SaveService . checkVersion ( MultiPropertyConverter . class , "1.3" ) ; <START_BUG> SaveService . checkVersion ( SampleResultConverter . class , "1.6" ) ; <END_BUG> SaveService . checkVersion ( StringPropertyConverter . class , "1.6" ) ; SaveService . checkVersion ( TestElementConverter . class , "1.2" ) ; SaveService . checkVersion ( TestElementPropertyConverter . class , "1.4" ) ; SaveService . checkVersion ( ScriptWrapperConverter . class , "1.3" ) ; if ( ! ( SaveService . PROPVERSION . equalsIgnoreCase ( SaveService . propertiesVersion ) ) ) { SaveService . log . warn ( ( ( ( "Property<seq2seq4repair_space>file<seq2seq4repair_space>-<seq2seq4repair_space>expected<seq2seq4repair_space>" + ( SaveService . PROPVERSION ) ) + ",<seq2seq4repair_space>found<seq2seq4repair_space>" ) + ( SaveService . propertiesVersion ) ) ) ; } if ( SaveService . versionsOK ) { SaveService . log . info ( "All<seq2seq4repair_space>converter<seq2seq4repair_space>versions<seq2seq4repair_space>present<seq2seq4repair_space>and<seq2seq4repair_space>correct" ) ; } } public static TestResultWrapper loadTestResults ( InputStream reader ) throws Exception { } public static HashTree loadTree ( InputStream reader ) throws Exception { } public static boolean isSaveTestPlanFormat20 ( ) { } public static boolean isSaveTestLogFormat20 ( ) { } public static class Test extends JMeterTestCase { public Test ( ) { } public Test ( String name ) { } public void testVersions ( ) throws Exception { } } }

Fix:
SaveService . checkVersion ( SampleResultConverter . class , "1.7" ) ;
Buggy code:
public class ChildDetailsViewPager extends FragmentPagerAdapter { private final String [ ] TITLES = new String [ ] { "Child<seq2seq4repair_space>Summary" , "Weight" , "Vaccinate<seq2seq4repair_space>Child" , "AEFI" , "Immunization<seq2seq4repair_space>Card" } ; private FragmentManager fragmentManager ; private FragmentTransaction tx ; private Context context ; private Child currentChild ; private String appointmentId ; public ChildDetailsViewPager ( Context ctx , FragmentManager fm , Child currentChild , String appointmentId ) { } @ Override public void destroyItem ( View collection , int position , Object o ) { } @ Override public CharSequence getPageTitle ( int position ) { } @ Override public int getCount ( ) { } @ Override public Fragment getItem ( int position ) { if ( position == 0 ) { tx . addToBackStack ( "ChildSummaryFragment" ) ; <START_BUG> return ChildSummaryPagerFragment . newInstance ( position , currentChild ) ; <END_BUG> } else if ( position == 1 ) { tx . addToBackStack ( TITLES [ position ] ) ; return ChildWeightPagerFragment . newInstance ( currentChild ) ; } else if ( position == 2 ) { tx . addToBackStack ( TITLES [ position ] ) ; return ChildVaccinatePagerFragment . newInstance ( currentChild , appointmentId ) ; } else if ( position == 3 ) { tx . addToBackStack ( TITLES [ position ] ) ; return ChildAefiPagerFragment . newInstance ( currentChild ) ; } else { tx . addToBackStack ( TITLES [ position ] ) ; return ChildImmCardPagerFragment . newInstance ( currentChild ) ; } } }

Fix:
return ChildSummaryPagerFragment . newInstance ( position , currentChild . getId ( ) ) ;
Buggy code:
@ Configuration public class ProxyCachingConfiguration extends AbstractCachingConfiguration { @ Bean ( name = AnnotationConfigUtils . CACHE_ADVISOR_BEAN_NAME ) @ Role ( BeanDefinition . ROLE_INFRASTRUCTURE ) public BeanFactoryCacheOperationSourceAdvisor cacheAdvisor ( ) { BeanFactoryCacheOperationSourceAdvisor advisor = new BeanFactoryCacheOperationSourceAdvisor ( ) ; advisor . setCacheOperationSource ( cacheOperationSource ( ) ) ; advisor . setAdvice ( cacheInterceptor ( ) ) ; <START_BUG> advisor . setOrder ( this . enableCaching . getInt ( "order" ) ) ; <END_BUG> return advisor ; } @ Bean @ Role ( BeanDefinition . ROLE_INFRASTRUCTURE ) public CacheOperationSource cacheOperationSource ( ) { } @ Bean @ Role ( BeanDefinition . ROLE_INFRASTRUCTURE ) public CacheInterceptor cacheInterceptor ( ) { } }

Fix:
advisor . setOrder ( this . enableCaching . < Integer > getNumber ( "order" ) ) ;
Buggy code:
public class CompactCalendarTest { @ Test public void testFromMillis ( ) { } @ Test public void testBeforeAndAfter ( ) { } @ Test public void testAsUTCTimeInTimeZone ( ) { CompactCalendar calendar = CompactCalendar . fromMillis ( 1000000 ) ; CompactCalendar inTimeZone = calendar . asUTCTimeInTimeZone ( TimeZone . getTimeZone ( "GMT+2" ) ) ; assertEquals ( calendar . getCalendar ( ) . getTimeInMillis ( ) , 1000000 ) ; <START_BUG> assertEquals ( inTimeZone . getCalendar ( ) . getTimeInMillis ( ) , ( 1000000 + ( ( ( 2 * 60 ) * 60 ) * 1000 ) ) ) ; <END_BUG> assertEquals ( "UTC" , inTimeZone . getTimeZoneId ( ) ) ; } }

Fix:
assertEquals ( inTimeZone . getCalendar ( ) . getTimeInMillis ( ) , ( 1000000 - ( ( ( 2 * 60 ) * 60 ) * 1000 ) ) ) ;
Buggy code:
public class ConsoleShareRosterEntryContributionItem extends AbstractRosterEntryContributionItem { public ConsoleShareRosterEntryContributionItem ( ) { } public ConsoleShareRosterEntryContributionItem ( String id ) { } protected IAction [ ] makeActions ( ) { final TextSelection selection = ConsoleShare . getSelection ( ) ; if ( selection == null ) return null ; final IRosterEntry entry = getSelectedRosterEntry ( ) ; final IContainer c = getContainerForRosterEntry ( entry ) ; if ( ( entry != null ) && ( c != null ) ) { final IChannelContainerAdapter channelAdapter = ( ( IChannelContainerAdapter ) ( c . getAdapter ( IChannelContainerAdapter . class ) ) ) ; if ( ( channelAdapter != null ) && ( isAvailable ( entry ) ) ) { final ConsoleShare tmp = ConsoleShare . getStackShare ( c . getID ( ) ) ; if ( tmp != null ) { final ConsoleShare stackshare = tmp ; final IAction action = new Action ( ) { public void run ( ) { <START_BUG> stackshare . sendShareStackRequest ( entry . getRoster ( ) . getUser ( ) . getName ( ) , entry . getUser ( ) . getID ( ) , selection . getText ( ) ) ; <END_BUG> } } ; action . setText ( ConsoleShare_RosterEntryMenu ) ; action . setImageDescriptor ( Activator . imageDescriptorFromPlugin ( PLUGIN_ID , ConsoleShare_RosterContributionItem_CONSOLE_ICON ) ) ; return new IAction [ ] { action } ; } } } return null ; } }

Fix:
stackshare . sendShareConsoleSelection ( entry . getRoster ( ) . getUser ( ) . getName ( ) , entry . getUser ( ) . getID ( ) , selection . getText ( ) ) ;
Buggy code:
public class TestBooleanScorer extends LuceneTestCase { public TestBooleanScorer ( String name ) { } private static final String FIELD = "category" ; public void testMethod ( ) throws Exception { } public void testEmptyBucketWithMoreDocs ( ) throws Exception { Similarity sim = Similarity . getDefault ( ) ; Scorer [ ] scorers = new Scorer [ ] { new Scorer ( sim ) { private int doc = - 1 ; @ Override public float score ( ) throws IOException { return 0 ; } @ Override public int docID ( ) { return doc ; } @ Override public int nextDoc ( ) throws IOException { return doc = ( ( doc ) == ( - 1 ) ) ? 3000 : NO_MORE_DOCS ; } @ Override public int advance ( int target ) throws IOException { return doc = ( target <= 3000 ) ? 3000 : NO_MORE_DOCS ; } } } ; <START_BUG> BooleanScorer bs = new BooleanScorer ( sim , 1 , Arrays . asList ( scorers ) , null ) ; <END_BUG> assertEquals ( "should<seq2seq4repair_space>have<seq2seq4repair_space>received<seq2seq4repair_space>3000" , 3000 , bs . nextDoc ( ) ) ; assertEquals ( "should<seq2seq4repair_space>have<seq2seq4repair_space>received<seq2seq4repair_space>NO_MORE_DOCS" , NO_MORE_DOCS , bs . nextDoc ( ) ) ; } }

Fix:
BooleanScorer bs = new BooleanScorer ( sim , 1 , Arrays . asList ( scorers ) , null , scorers . length ) ;
Buggy code:
public class Arena implements Serializable { private static final long serialVersionUID = 1301968695579108833L ; int WH ; int WW ; private static int [ ] [ ] grad3 = new int [ ] [ ] { new int [ ] { 1 , 1 , 0 } , new int [ ] { - 1 , 1 , 0 } , new int [ ] { 1 , - 1 , 0 } , new int [ ] { - 1 , - 1 , 0 } , new int [ ] { 1 , 0 , 1 } , new int [ ] { - 1 , 0 , 1 } , new int [ ] { 1 , 0 , - 1 } , new int [ ] { - 1 , 0 , - 1 } , new int [ ] { 0 , 1 , 1 } , new int [ ] { 0 , - 1 , 1 } , new int [ ] { 0 , 1 , - 1 } , new int [ ] { 0 , - 1 , - 1 } } ; private int [ ] p = new int [ 256 ] ; private String worldstring ; private int [ ] perm = new int [ 512 ] ; float [ ] [ ] simplexnoise ; boolean f = true ; Sprite [ ] sprites = new Sprite [ 8 ] ; int zoom = 0 ; public Arena ( int WW , int WH , int [ ] p ) { } public Arena ( int WW , int WH ) { } public void generate ( ) { simplexnoise = new float [ WW ] [ WH ] ; <START_BUG> float frequency = 6.0F // ( ( float ) ( WH ) ) ; <END_BUG> for ( int i = 0 ; i < 512 ; i ++ ) { perm [ i ] = p [ ( i & 255 ) ] ; } for ( int x = 0 ; x < ( WH ) ; x ++ ) { for ( int y = 0 ; y < ( WH ) ; y ++ ) { simplexnoise [ x ] [ y ] = ( ( float ) ( noise ( ( x * frequency ) , ( y * frequency ) ) ) ) ; simplexnoise [ x ] [ y ] = ( ( ( ( simplexnoise [ x ] [ y ] ) + 1 ) // 2 ) * 10 ) - 2 ; if ( ( simplexnoise [ x ] [ y ] ) < 0 ) { simplexnoise [ x ] [ y ] = 0 ; } } } } public void render ( double dt , Game game , int xoffset , int yoffset ) { } private int fastfloor ( double x ) { } private double dot ( int [ ] g , double x , double y ) { } public double noise ( double xin , double yin ) { } public String getWorldString ( ) { } public int getWW ( ) { } public int getWH ( ) { } public void zoom ( int zoom ) { } public static void update ( ) { } }

Fix:
float frequency = 5.0F // ( ( float ) ( WH ) ) ;
Buggy code:
public class ServerDeploymentRepositoryAdd extends AbstractServerModelUpdate < Void > { private static final long serialVersionUID = - 1611269698053636197L ; private static final String DEFAULT_NAME = "default" ; private final String path ; private String name ; private String relativeTo ; private int interval = 0 ; private boolean enabled = true ; public ServerDeploymentRepositoryAdd ( String path , int interval , boolean enabled ) { } public String getName ( ) { } public void setName ( String name ) { } public String getRelativePath ( ) { } public void setRelativeTo ( String relativePath ) { } @ Override protected void applyUpdate ( ServerModel element ) throws UpdateFailedException { } @ Override public AbstractServerModelUpdate < ? > getCompensatingUpdate ( ServerModel original ) { } @ Override public < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { <START_BUG> final ServiceTarget target = updateContext . getBatchBuilder ( ) . subTarget ( ) ; <END_BUG> target . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( resultHandler , param ) ) ; DeploymentScannerService . addService ( target , repositoryName ( ) , relativeTo , path , interval , TimeUnit . MILLISECONDS , enabled ) ; } private String repositoryName ( ) { } }

Fix:
final ServiceTarget target = updateContext . getServiceTarget ( ) . subTarget ( ) ;
Buggy code:
public class MyAttendanceFragment extends BaseFragment implements DatePickerDialog . OnDateSetListener , AttendanceRow . AttendanceListener { public static Date selectedDate = new Date ( ) ; TextView monthTextView ; Button monthPickerButton ; ListView attendanceListView ; WaitingLayout waitingLayout ; ArrayList < Attendance > attendances ; AttendanceArrayAdapter arrayAdapter ; DatePickerDialog monthPickerDialog ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onResume ( ) { } @ Override public void init ( ) { } @ Override public void setNavTitle ( ) { int count = ( ( attendances ) == null ) ? 0 : attendances . size ( ) ; <START_BUG> parentActivity . setNavTitle ( String . format ( "My<seq2seq4repair_space>Attendances<seq2seq4repair_space>(%d)" , count ) ) ; <END_BUG> } @ Override public void onCancelAttendance ( Attendance attendance ) { } private void getAttendances ( ) { } @ Override public void onDateSet ( DatePicker view , int year , int monthOfYear , int dayOfMonth ) { } }

Fix:
parentActivity . setNavTitle ( String . format ( "My<seq2seq4repair_space>Attendance<seq2seq4repair_space>(%d)" , count ) ) ;
Buggy code:
@ Dependent public class PopupFormDisplayerView extends BaseModal implements FormDisplayerView { @ Inject private StartProcessFormDisplayProviderImpl widgetPresenter ; private Command onCloseCommand ; private Command childCloseCommand ; private FormContentResizeListener formContentResizeListener ; private boolean initialized = false ; private FlowPanel body = new FlowPanel ( ) ; private ModalFooter footer = new ModalFooter ( ) ; private GenericFormDisplayer currentDisplayer ; @ PostConstruct protected void init ( ) { onCloseCommand = new Command ( ) { @ Override public void execute ( ) { closePopup ( ) ; } } ; formContentResizeListener = new FormContentResizeListener ( ) { @ Override public void resize ( int width , int height ) { <START_BUG> if ( width > 0 ) <END_BUG> setWidth ( ( width + 20 ) ) ; centerVertically ( getElement ( ) ) ; } } ; add ( body ) ; add ( footer ) ; this . addHiddenHandler ( new HiddenHandler ( ) { @ Override public void onHidden ( HiddenEvent hiddenEvent ) { if ( initialized ) closePopup ( ) ; } } ) ; } @ Override public void display ( GenericFormDisplayer displayer ) { } public void closePopup ( ) { } private native void centerVertically ( Element e ) { } @ Override public Command getOnCloseCommand ( ) { } @ Override public void setOnCloseCommand ( Command onCloseCommand ) { } @ Override public FormContentResizeListener getResizeListener ( ) { } @ Override public void setResizeListener ( FormContentResizeListener resizeListener ) { } @ Override public GenericFormDisplayer getCurrentDisplayer ( ) { } }

Fix:
if ( width > ( getOffsetWidth ( ) ) )
Buggy code:
public class MainActivity extends ActionBarActivity { private final String ANSWER = "ANTWORT" ; private final String NEXT = "WEITER" ; private Button nextButton ; private TextView questText ; private TextView ansText ; private TextView proText ; private TextView knownText ; private TextView overallKnownText ; private RadioButton randBox ; private RadioButton knownBox ; private RadioButton standardBox ; private float pro = 0.0F ; private SeekBar knownBar ; private int rating ; private String [ ] questions ; private String [ ] answers ; private int countQuest = 1 ; private int countAnsw = 0 ; private int countRand = 0 ; private int countId = 0 ; private int countKnownList = 0 ; private static final Random rand = new Random ( ) ; private boolean wasKnown = false ; private List < Integer > knownList ; private DatabaseManager dbManager ; private SharedPreferences prefs ; private final String MODE_KEY = "MODE" ; private final String COUNTER_KEY = "COUNTER_KEY" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void setState ( ) { } private void saveState ( ) { } private void setKnownRadioListener ( ) { } private void setKnownbarListener ( ) { knownBar . setOnSeekBarChangeListener ( new SeekBar . OnSeekBarChangeListener ( ) { @ Override public void onProgressChanged ( SeekBar seekBar , int progress , boolean fromUser ) { rating = progress ; knownText . setText ( ( ( "GEWUSST<seq2seq4repair_space>ZU:\t" + progress ) + "%" ) ) ; } @ Override public void onStartTrackingTouch ( SeekBar seekBar ) { } @ Override public void onStopTrackingTouch ( SeekBar seekBar ) { <START_BUG> String action = dbManager . createRating ( countId , rating ) ; <END_BUG> Log . d ( "rating" , ( "<seq2seq4repair_space>" + action ) ) ; } } ) ; } private void setNextButtonListener ( ) { } private void switchQuestAnsw ( ) { } private void setRating ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void prepareQuestions ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onResume ( ) { } private void prepareAnswers ( ) { } }

Fix:
String action = dbManager . createRating ( knownList . get ( ( ( countKnownList ) - 1 ) ) , rating ) ;
Buggy code:
class WebValveAdd extends AbstractAddStepHandler { static final WebValveAdd INSTANCE = new WebValveAdd ( ) ; private WebValveAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode baseOperation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { ModelNode operation = Tools . readModel ( context . readResource ( EMPTY_ADDRESS ) ) ; final PathAddress address = PathAddress . pathAddress ( baseOperation . get ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; String classname = null ; if ( CLASS_NAME . resolveModelAttribute ( context , operation ) . isDefined ( ) ) classname = CLASS_NAME . resolveModelAttribute ( context , operation ) . asString ( ) ; String module = null ; if ( MODULE . resolveModelAttribute ( context , operation ) . isDefined ( ) ) module = MODULE . resolveModelAttribute ( context , operation ) . asString ( ) ; final WebValveService service = new WebValveService ( name , classname , module ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; <START_BUG> final ServiceBuilder < ? > serviceBuilder = serviceTarget . addService ( JBOSS_WEB_HOST . append ( name ) , service ) . addDependency ( SERVICE_NAME , PathManager . class , service . getPathManagerInjector ( ) ) . addDependency ( JBOSS_WEB , WebServer . class , service . getWebServer ( ) ) ; <END_BUG> if ( operation . get ( WebExtension . FILE_PATH . getKey ( ) , WebExtension . FILE_PATH . getValue ( ) ) . isDefined ( ) ) { final ModelNode directory = operation . get ( WebExtension . FILE_PATH . getKey ( ) , WebExtension . FILE_PATH . getValue ( ) ) ; String relativeTo = null ; if ( RELATIVE_TO . resolveModelAttribute ( context , directory ) . isDefined ( ) ) relativeTo = RELATIVE_TO . resolveModelAttribute ( context , directory ) . asString ( ) ; String path = null ; if ( PATH . resolveModelAttribute ( context , directory ) . isDefined ( ) ) path = PATH . resolveModelAttribute ( context , directory ) . asString ( ) ; service . setFilePaths ( path , relativeTo ) ; } if ( operation . hasDefined ( Constants . PARAM ) ) { service . setParam ( operation . get ( Constants . PARAM ) . clone ( ) ) ; } serviceBuilder . addListener ( verificationHandler ) ; newControllers . add ( serviceBuilder . install ( ) ) ; } }

Fix:
final ServiceBuilder < ? > serviceBuilder = serviceTarget . addService ( JBOSS_WEB_VALVE . append ( name ) , service ) . addDependency ( SERVICE_NAME , PathManager . class , service . getPathManagerInjector ( ) ) . addDependency ( JBOSS_WEB , WebServer . class , service . getWebServer ( ) ) ;
Buggy code:
public class XPathFileContainer { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private final NodeList nodeList ; private final String fileName ; private final String xpath ; private int nextRow ; int getNextRow ( ) { } public XPathFileContainer ( String file , String xpath ) throws FileNotFoundException , IOException , ParserConfigurationException , TransformerException , SAXException { } private NodeList load ( ) throws FileNotFoundException , IOException , ParserConfigurationException , TransformerException , SAXException { } public String getXPathString ( int num ) { } public int nextRow ( ) { int row = nextRow ; ( nextRow ) ++ ; if ( ( nextRow ) >= ( size ( ) ) ) { nextRow = 0 ; } <START_BUG> XPathFileContainer . log . debug ( new StringBuffer ( "Row:<seq2seq4repair_space>" ) . append ( row ) . toString ( ) ) ; <END_BUG> return row ; } public int size ( ) { } public String getFileName ( ) { } }

Fix:
XPathFileContainer . log . debug ( new StringBuilder ( "Row:<seq2seq4repair_space>" ) . append ( row ) . toString ( ) ) ;