nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AbstractDistributionTest extends ContainerAbstractTestCase { protected IRemoteServiceContainerAdapter [ ] adapters = null ; protected abstract String getClientContainerName ( ) { } protected void tearDown ( ) throws Exception { } protected void setClientCount ( int count ) { } protected void setupRemoteServiceAdapters ( ) throws Exception { } protected BundleContext getContext ( ) { } protected IRemoteServiceContainerAdapter [ ] getRemoteServiceAdapters ( ) { } protected IRemoteServiceListener createRemoteServiceListener ( final boolean server ) { } protected void addRemoteServiceListeners ( ) { } protected IRemoteServiceRegistration registerRemoteService ( IRemoteServiceContainerAdapter adapter , String serviceInterface , Object service , Dictionary serviceProperties , int sleepTime ) { } protected IRemoteServiceReference [ ] getRemoteServiceReferences ( IRemoteServiceContainerAdapter adapter , String clazz , String filter ) { } protected IRemoteService getRemoteService ( IRemoteServiceContainerAdapter adapter , String clazz , String filter ) { } protected String getFilterFromServiceProperties ( Dictionary serviceProperties ) { } protected String [ ] getDefaultServiceClasses ( ) { } protected Object getDefaultService ( ) { } protected ServiceRegistration registerService ( String [ ] clazzes , Object service , Properties props ) throws Exception { } protected ServiceRegistration registerService ( String clazz , Object service , Properties props ) throws Exception { } protected ServiceRegistration registerDefaultService ( Properties props ) throws Exception { } public ServiceReference getReference ( ) { } protected void assertReferenceHasCorrectType ( ServiceReference sr , String classname ) { } protected void assertReferencesValidAndFirstHasCorrectType ( ServiceReference [ ] references , String classname ) { } protected void assertReferencesValid ( ServiceReference [ ] references ) { } protected void assertStringResultValid ( Object result , String compare ) { } protected void assertProxyValid ( Object proxy ) { } protected ServiceTracker createProxyServiceTracker ( String clazz ) throws InvalidSyntaxException { ServiceTracker st = new ServiceTracker ( getContext ( ) , getContext ( ) . createFilter ( ( ( ( ( ( ( "(&(" + ( Constants . OBJECTCLASS ) ) + "=" ) + clazz ) + ")(" ) + ( RemoteConstants . SERVICE_IMPORTED ) ) + "=*))" ) ) , new ServiceTrackerCustomizer ( ) { public Object addingService ( ServiceReference reference ) { Trace . trace ( PLUGIN_ID , ( "addingService=" + reference ) ) ; return getContext ( ) . getService ( reference ) ; } public void modifiedService ( ServiceReference reference , Object service ) { Trace . trace ( PLUGIN_ID , ( "modifiedService=" + reference ) ) ; } public void removedService ( ServiceReference reference , Object service ) { Trace . trace ( PLUGIN_ID , ( ( ( "removedService=" + reference ) + ",svc=" ) + service ) ) ; } } ) ; <START_BUG> st . open ( ) ; <END_BUG> return st ; } protected IRemoteService getRemoteServiceFromProxy ( Object proxy ) { } }

Fix:
st . open ( true ) ;
Buggy code:
public class SumOperation extends NumberAggregationOperation { @ Override protected Number aggregateNumbers ( List < Number > numbers ) throws InvalidExpressionException { } private double calculateSum ( List < Number > values ) throws InvalidExpressionException { double sum = 0 ; for ( Number value : values ) { <START_BUG> sum = sum + ( value . doubleValue ( ) ) ; <END_BUG> } return sum ; } }

Fix:
sum += value . doubleValue ( ) ;
Buggy code:
public class BundlePatchingTestCase extends AbstractTaskTestCase { @ Test public void testAddBundle ( ) throws Exception { } @ Test public void testModifyBundle ( ) throws Exception { } @ Test public void testRemoveBundle ( ) throws Exception { PatchInfo info = new org . jboss . as . patching . LocalPatchInfo ( TestUtils . randomString ( ) , PatchInfo . BASE , Collections . < String > emptyList ( ) , env ) ; String bundleName = TestUtils . randomString ( ) ; File bundlesDir = env . getInstalledImage ( ) . getBundlesDir ( ) ; TestUtils . createBundle ( env . getInstalledImage ( ) . getJbossHome ( ) , bundleName , true ) ; byte [ ] existingHash = HashUtils . hashFile ( new File ( bundlesDir , bundleName ) ) ; <START_BUG> ContentModification bundleRemoved = new ContentModification ( new BundleItem ( bundleName , null , existingHash ) , existingHash , REMOVE ) ; <END_BUG> Patch patch = PatchBuilder . create ( ) . setPatchId ( TestUtils . randomString ( ) ) . setDescription ( TestUtils . randomString ( ) ) . setOneOffType ( info . getVersion ( ) ) . addContentModification ( bundleRemoved ) . build ( ) ; File patchDir = TestUtils . mkdir ( tempDir , patch . getPatchId ( ) ) ; TestUtils . createPatchXMLFile ( patchDir , patch ) ; File zippedPatch = TestUtils . createZippedPatchFile ( patchDir , patch . getPatchId ( ) ) ; PatchingResult result = executePatch ( info , zippedPatch ) ; PatchingAssert . assertPatchHasBeenApplied ( result , patch ) ; File bundlesPatchDirectory = env . getBundlesPatchDirectory ( patch . getPatchId ( ) ) ; PatchingAssert . assertDirExists ( bundlesPatchDirectory ) ; PatchingAssert . assertContains ( bundlesPatchDirectory , TestUtils . getBundlePath ( env , result . getPatchInfo ( ) ) ) ; PatchingAssert . assertDefinedAbsentBundle ( TestUtils . getBundlePath ( env , result . getPatchInfo ( ) ) , bundleName ) ; } }

Fix:
ContentModification bundleRemoved = new ContentModification ( new org . jboss . as . patching . metadata . BundleItem ( bundleName , null , IoUtils . NO_CONTENT ) , existingHash , REMOVE ) ;
Buggy code:
public class ContainerBuggyBench extends Container { public InventoryBuggyBench craftMatrix = new InventoryBuggyBench ( this ) ; public IInventory craftResult = new InventoryCraftResult ( ) ; private final World worldObj ; public ContainerBuggyBench ( InventoryPlayer par1InventoryPlayer , int x , int y , int z ) { } @ Override public void onContainerClosed ( EntityPlayer par1EntityPlayer ) { super . onContainerClosed ( par1EntityPlayer ) ; if ( ! ( this . worldObj . isRemote ) ) { <START_BUG> for ( int var2 = 1 ; var2 < 18 ; ++ var2 ) { <END_BUG> final ItemStack slot = this . craftMatrix . getStackInSlotOnClosing ( var2 ) ; if ( slot != null ) { par1EntityPlayer . entityDropItem ( slot , 0.0F ) ; } } } } @ Override public void onCraftMatrixChanged ( IInventory par1IInventory ) { } @ Override public boolean canInteractWith ( EntityPlayer par1EntityPlayer ) { } @ Override public ItemStack transferStackInSlot ( EntityPlayer par1EntityPlayer , int par1 ) { } protected boolean mergeOneItem ( ItemStack par1ItemStack , int par2 , int par3 , boolean par4 ) { } }

Fix:
for ( int var2 = 1 ; var2 < ( this . craftMatrix . getSizeInventory ( ) ) ; ++ var2 ) {
Buggy code:
public class HomePresenterImpl implements HomePresenter { private HomeView mView ; private IntPreference mVideoLockPreference ; private Snackbar mSnackbar ; private boolean mDidUndo = false ; public HomePresenterImpl ( HomeView view , IntPreference vidLockPref ) { } @ Override public void loadVideos ( ) { } @ Override public void deleteVideos ( final SparseArray < Video > videos ) { if ( ( videos . size ( ) ) > 0 ) { <START_BUG> String text = ( ( videos . size ( ) ) == 1 ) ? String . format ( "%s<seq2seq4repair_space>was<seq2seq4repair_space>deleted" , videos . valueAt ( 0 ) . name ) : String . format ( "%d<seq2seq4repair_space>videos<seq2seq4repair_space>deleted" ) ; <END_BUG> if ( ( mSnackbar ) != null ) { mSnackbar . dismiss ( ) ; } mDidUndo = false ; mSnackbar = Snackbar . with ( mView . getActivity ( ) ) . text ( text ) . swipeToDismiss ( true ) . actionLabel ( undo ) . actionColorResource ( accent ) . actionListener ( new ActionClickListener ( ) { @ Override public void onActionClicked ( Snackbar snackbar ) { mDidUndo = true ; } } ) . eventListener ( new FabEventListener ( mView . getFab ( ) ) { @ Override public void onDismissed ( Snackbar snackbar ) { if ( mDidUndo ) { mView . addBack ( videos ) ; } else { for ( int i = 0 ; i < ( videos . size ( ) ) ; i ++ ) { Video video = videos . valueAt ( i ) ; video . delete ( ) ; Timber . d ( "Video<seq2seq4repair_space>[%s]<seq2seq4repair_space>was<seq2seq4repair_space>deleted:<seq2seq4repair_space>%b" , video . name , ( ( video . id ) == null ) ) ; } } } } ) ; mSnackbar . show ( mView . getActivity ( ) ) ; } } @ Override public void onFabClick ( ) { } @ Override public void openSettings ( ) { } @ Override public void onVideoSelected ( Video video ) { } @ Override public void processContent ( Uri content ) { } private String getString ( int resId ) { } }

Fix:
String text = ( ( videos . size ( ) ) == 1 ) ? String . format ( "%s<seq2seq4repair_space>was<seq2seq4repair_space>deleted" , videos . valueAt ( 0 ) . name ) : String . format ( "%d<seq2seq4repair_space>videos<seq2seq4repair_space>deleted" , videos . size ( ) ) ;
Buggy code:
public final class WSRefDDProcessor extends AbstractDeploymentDescriptorBindingsProcessor { @ Override protected List < BindingConfiguration > processDescriptorEntries ( final DeploymentUnit unit , final DeploymentDescriptorEnvironment environment , final EEModuleDescription moduleDescription , final ComponentDescription componentDescription , final ClassLoader classLoader , final DeploymentReflectionIndex deploymentReflectionIndex , final EEApplicationClasses applicationClasses ) throws DeploymentUnitProcessingException { final ServiceReferencesMetaData serviceRefsMD = environment . getEnvironment ( ) . getServiceReferences ( ) ; if ( serviceRefsMD == null ) { return Collections . < BindingConfiguration > emptyList ( ) ; } final List < BindingConfiguration > bindingDescriptions = new LinkedList < BindingConfiguration > ( ) ; for ( final ServiceReferenceMetaData serviceRefMD : serviceRefsMD ) { final UnifiedServiceRefMetaData serviceRefUMDM = WSRefDDProcessor . getServiceRef ( unit , serviceRefMD ) ; final WSRefValueSource valueSource = new WSRefValueSource ( serviceRefUMDM ) ; final BindingConfiguration bindingConfiguration = new BindingConfiguration ( serviceRefUMDM . getServiceRefName ( ) , valueSource ) ; bindingDescriptions . add ( bindingConfiguration ) ; final String serviceRefTypeName = serviceRefUMDM . getServiceRefType ( ) ; final Class < ? > serviceRefType = getClass ( classLoader , serviceRefTypeName ) ; <START_BUG> processInjectionTargets ( moduleDescription , applicationClasses , valueSource , classLoader , deploymentReflectionIndex , serviceRefMD , serviceRefType ) ; <END_BUG> } return bindingDescriptions ; } private static UnifiedServiceRefMetaData getServiceRef ( final DeploymentUnit unit , final ServiceReferenceMetaData serviceRefMD ) throws DeploymentUnitProcessingException { } private static void processWSFeatures ( final DeploymentUnit unit , final Set < ResourceInjectionTargetMetaData > injectionTargets , final UnifiedServiceRefMetaData serviceRefUMDM ) throws DeploymentUnitProcessingException { } private Class < ? > getClass ( final ClassLoader classLoader , final String className ) throws DeploymentUnitProcessingException { } private static UnifiedVirtualFile getUnifiedVirtualFile ( final DeploymentUnit deploymentUnit ) { } private static boolean isEmpty ( final String string ) { } }

Fix:
processInjectionTargets ( moduleDescription , componentDescription , applicationClasses , valueSource , classLoader , deploymentReflectionIndex , serviceRefMD , serviceRefType ) ;
Buggy code:
public class ProjectIssuesDashboardTest { ProjectIssuesDashboard template = new ProjectIssuesDashboard ( ) ; @ Test public void should_have_a_name ( ) { } @ Test public void should_be_registered_as_an_extension ( ) { } @ Test public void should_create_dashboard ( ) { Dashboard dashboard = template . createDashboard ( ) ; assertThat ( dashboard . getLayout ( ) ) . isEqualTo ( TWO_COLUMNS ) ; <START_BUG> assertThat ( dashboard . getWidgets ( ) ) . hasSize ( 5 ) ; <END_BUG> } }

Fix:
assertThat ( dashboard . getWidgets ( ) ) . hasSize ( 1 ) ;
Buggy code:
public class database { public static void insertInBulk ( ArrayList < String > doc_ids ) throws Exception { } public static void updateDocumentRatings ( Connection conn , String doc_id , String columnNameToBeModified ) throws Exception { } public static void updateGlobalRatings ( Connection conn , int ratingValue ) throws Exception { } public static void updateTotalHits ( Connection conn ) throws Exception { } public static int getNumberOfDocuments ( Connection conn ) throws Exception { } public static HashMap < String , HashMap < String , Integer > > getRatingsForAllDocuments ( Connection conn , ArrayList < String > doc_ids ) throws Exception { } public static HashMap < String , Integer > getDocumentRatings ( Connection conn , String doc_id ) throws Exception { } public static double getAverageRating ( Connection conn ) throws Exception { } public static double getTotalHits ( Connection conn ) throws Exception { } public static ArrayList < String > getAll ( ) throws Exception { } public static void postData ( String doc_id , String rating ) throws Exception { } public static Connection getConnection ( ) throws Exception { Connection conn = null ; try { String driver = "com.mysql.jdbc.Driver" ; <START_BUG> String url = "jdbc:mysql:////192.168.0.110:3306//first_database" ; <END_BUG> String username = "root" ; String password = "<seq2seq4repair_space>" ; Class . forName ( driver ) ; conn = DriverManager . getConnection ( url , username , password ) ; System . out . println ( "Successfully<seq2seq4repair_space>Connected" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return conn ; } static void firstTimeInsertion ( ) { } static String getIDFromJSON ( String fileContent ) { } static String getFileContent ( String filepath ) { } }

Fix:
String url = "jdbc:mysql:////10.202.157.33:3306//first_database" ;
Buggy code:
public class CreateCommand extends Command { public CreateCommand ( ) { } @ Override public void execute ( Player player , String [ ] args ) throws CommandException { Bazar bazar = BazarManager . getBazar ( player . getName ( ) ) ; if ( bazar != null ) { throw new CommandException ( "Masz<seq2seq4repair_space>juz<seq2seq4repair_space>stworzony<seq2seq4repair_space>bazar!" ) ; } Location spawnLocation = BazzarsPlugin . getConfiguration ( ) . getSpawnLocation ( ) ; spawnLocation . setY ( player . getLocation ( ) . getY ( ) ) ; if ( ! ( player . getLocation ( ) . getWorld ( ) . getName ( ) . equals ( BazzarsPlugin . getConfiguration ( ) . getSpawnLocation ( ) . getWorld ( ) . getName ( ) ) ) ) { <START_BUG> throw new CommandException ( ( ( "Bazar<seq2seq4repair_space>mozesz<seq2seq4repair_space>zalozyc<seq2seq4repair_space>tylko<seq2seq4repair_space>na<seq2seq4repair_space>swiecie<seq2seq4repair_space>" + ( BazzarsPlugin . getConfiguration ( ) . getDistanceSpawn ( ) ) ) + "!" ) ) ; <END_BUG> } else if ( ( player . getLocation ( ) . distance ( spawnLocation ) ) > ( BazzarsPlugin . getConfiguration ( ) . getDistanceSpawn ( ) ) ) { throw new CommandException ( ( ( "Nie<seq2seq4repair_space>mozesz<seq2seq4repair_space>zalozyc<seq2seq4repair_space>bazaru<seq2seq4repair_space>dalej<seq2seq4repair_space>niz<seq2seq4repair_space>" + ( BazzarsPlugin . getConfiguration ( ) . getDistanceSpawn ( ) ) ) + "<seq2seq4repair_space>kratek<seq2seq4repair_space>od<seq2seq4repair_space>miejsca<seq2seq4repair_space>spawnu!" ) ) ; } else { bazar = new Bazar ( player . getName ( ) ) ; } Location location = player . getLocation ( ) ; location . setX ( ( ( location . getBlockX ( ) ) + 0.5 ) ) ; location . setZ ( ( ( location . getBlockZ ( ) ) + 0.5 ) ) ; player . teleport ( location ) ; BazarManager . addBazar ( bazar ) ; player . sendMessage ( ( ( ChatColor . GREEN ) + "Stworzono<seq2seq4repair_space>bazar." ) ) ; player . playSound ( player . getLocation ( ) , ANVIL_USE , 2.0F , 1.0F ) ; } }

Fix:
throw new CommandException ( ( ( "Bazar<seq2seq4repair_space>mozna<seq2seq4repair_space>zalozyc<seq2seq4repair_space>tylko<seq2seq4repair_space>na<seq2seq4repair_space>swiecie<seq2seq4repair_space>" + ( BazzarsPlugin . getConfiguration ( ) . getDistanceSpawn ( ) ) ) + "!" ) ) ;
Buggy code:
public class PrefixLevel1TypeBufferLevel2TypeCompletionTestCase extends AbstractGeneratedAddressCompleterTest { @ Test public void testStringValues ( ) { assertAllCandidates ( Arrays . asList ( "last4" , "link4" , "other4" ) ) ; assertSelectedCandidates ( Arrays . asList ( "last4" , "link4" ) ) ; assertBufferPrefix ( ".//link2//link3=" ) ; <START_BUG> assertContextPrefix ( "link1" ) ; <END_BUG> } @ Override protected int getBufferLevel ( ) { } @ Override protected int getPrefixLevel ( ) { } }

Fix:
assertContextPrefix ( "//link1" ) ;
Buggy code:
public class FunctionalSourceSetNodeInitializer implements NodeInitializer { private final Instantiator instantiator ; public FunctionalSourceSetNodeInitializer ( Instantiator instantiator ) { } @ Override public List < ? extends ModelReference < ? > > getInputs ( ) { } @ Override public void execute ( MutableModelNode modelNode , List < ModelView < ? > > inputs ) { ProjectSourceSet projectSourceSet = ( ( ProjectSourceSet ) ( inputs . get ( 0 ) . getInstance ( ) ) ) ; LanguageRegistry languageRegistry = ( ( LanguageRegistry ) ( inputs . get ( 1 ) . getInstance ( ) ) ) ; <START_BUG> File baseDir = ( ( Optional < File > ) ( inputs . get ( 2 ) . getInstance ( ) ) ) . get ( ) ; <END_BUG> DefaultFunctionalSourceSet defaultFunctionalSourceSet = new DefaultFunctionalSourceSet ( modelNode . getPath ( ) . getName ( ) , instantiator , projectSourceSet , languageRegistry , baseDir ) ; modelNode . setPrivateData ( DefaultFunctionalSourceSet . class , defaultFunctionalSourceSet ) ; } @ Override public List < ? extends ModelProjection > getProjections ( ) { } @ Nullable @ Override public ModelAction getProjector ( ModelPath path , ModelRuleDescriptor descriptor ) { } }

Fix:
File baseDir = ( ( File ) ( ( ( Optional < ? > ) ( inputs . get ( 4 ) . getInstance ( ) ) ) . get ( ) ) ) ;
Buggy code:
public class RightActivity extends Activity { private int [ ] colors ; private LinearLayout linearLayout ; private FrameLayout revealView ; private int cx ; private int cy ; private int pos ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_right ) ; linearLayout = ( ( LinearLayout ) ( findViewById ( right_answer_linearlayout ) ) ) ; Button nextColorButton = ( ( Button ) ( findViewById ( next_color_button ) ) ) ; revealView = ( ( FrameLayout ) ( findViewById ( root_layout ) ) ) ; Bundle bundle = getIntent ( ) . getExtras ( ) ; int color = bundle . getInt ( EXTRA_COLOR ) ; int [ ] location = bundle . getIntArray ( "location" ) ; cx = location [ 0 ] ; <START_BUG> cy = location [ 1 ] ; <END_BUG> pos = bundle . getInt ( "position" ) ; linearLayout . setBackgroundColor ( color ) ; colors = new ColorUtils ( ) . getRandomColor ( 3 ) ; nextColorButton . setBackgroundResource ( button_shape ) ; nextColorButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { revealView . setBackgroundColor ( colors [ pos ] ) ; GUIUtils . hideRevealEffect ( revealView , cx , cy , 1920 , hideAnimationListener ) ; } } ) ; } AnimatorListener hideAnimationListener = new Animator . AnimatorListener ( ) { @ Override public void onAnimationStart ( Animator animation ) { } @ Override public void onAnimationEnd ( Animator animation ) { } @ Override public void onAnimationCancel ( Animator animation ) { } @ Override public void onAnimationRepeat ( Animator animation ) { } } ; }

Fix:
cy = ( location [ 1 ] ) + ( bundle . getInt ( "actionBarSize" ) ) ;
Buggy code:
public class AzureServiceModule extends Node { private static final String AZURE_SERVICE_MODULE_ID = AzureServiceModule . class . getName ( ) ; private static final String ICON_PATH = "azure.png" ; private static final String BASE_MODULE_NAME = "Azure" ; private Project project ; private MobileServiceModule mobileServiceModule = new MobileServiceModule ( this ) ; private VMServiceModule vmServiceModule = new VMServiceModule ( this ) ; public AzureServiceModule ( Project project ) { } public AzureServiceModule ( Node parent , String iconPath , Object data ) { } @ Override protected Map < String , Class < ? extends NodeActionListener > > initActions ( ) { <START_BUG> addAction ( "Manage<seq2seq4repair_space>subscriptions" , new AzureServiceModule . ManageSubscriptionsAction ( ) ) ; <END_BUG> return null ; } public class ManageSubscriptionsAction extends NodeActionListener { @ Override public void actionPerformed ( NodeActionEvent e ) { } } @ Override protected void refreshItems ( ) { } @ Override public Project getProject ( ) { } }

Fix:
addAction ( "Manage<seq2seq4repair_space>Subscriptions" , new AzureServiceModule . ManageSubscriptionsAction ( ) ) ;
Buggy code:
public class JUnicastServerRefSf extends JUnicastServerRef { public JUnicastServerRefSf ( ) { } public JUnicastServerRefSf ( LiveRef ref , JServerRequestInterceptor [ ] sis , JClientRequestInterceptor [ ] cis ) { } public JUnicastServerRefSf ( int port , RMIClientSocketFactory csf , RMIServerSocketFactory ssf , JServerRequestInterceptor [ ] sis , JClientRequestInterceptor [ ] cis ) { } public String getRefClass ( ObjectOutput out ) { } protected RemoteRef getClientRef ( ) { <START_BUG> return new JUnicastRefSf ( ref , cis , JInterceptorStore . getJRMPInitializers ( ) ) ; <END_BUG> } }

Fix:
return new JUnicastRefSf ( ref , cis , JInterceptorStore . getJRMPInitializers ( ) , ( - 2 ) ) ;
Buggy code:
public class MainWindow extends JFrame { private MainOptions mainOptions ; private GameOptions gameOptions ; private GameConstructor game ; private MazeConstructor builder ; private JPanel contentPane ; public static void main ( String [ ] args ) { } public MainWindow ( ) { } private void initialize ( ) { } private void addListeners ( ) { mainOptions . getBtnLoadGame ( ) . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { } } ) ; mainOptions . getBtnOptions ( ) . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { CardLayout cardLayout = ( ( CardLayout ) ( contentPane . getLayout ( ) ) ) ; cardLayout . show ( contentPane , "Game<seq2seq4repair_space>Options" ) ; } } ) ; mainOptions . getBtnNewGame ( ) . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { contentPane . remove ( game ) ; <START_BUG> game = new GameConstructor ( gameOptions ) ; <END_BUG> contentPane . add ( game , "Game" ) ; CardLayout cardLayout = ( ( CardLayout ) ( contentPane . getLayout ( ) ) ) ; cardLayout . show ( contentPane , "Game" ) ; game . requestFocusInWindow ( ) ; } } ) ; mainOptions . getBtnMazeBuilder ( ) . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { builder = new MazeConstructor ( ) ; CardLayout cardLayout = ( ( CardLayout ) ( contentPane . getLayout ( ) ) ) ; cardLayout . show ( contentPane , "Maze<seq2seq4repair_space>builder" ) ; } } ) ; gameOptions . getBtnExit ( ) . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent arg0 ) { int result = JOptionPane . showConfirmDialog ( null , "Are<seq2seq4repair_space>you<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>wish<seq2seq4repair_space>to<seq2seq4repair_space>exit<seq2seq4repair_space>the<seq2seq4repair_space>options<seq2seq4repair_space>menu?" , null , JOptionPane . YES_NO_OPTION ) ; if ( result == ( JOptionPane . YES_OPTION ) ) { CardLayout cardLayout = ( ( CardLayout ) ( contentPane . getLayout ( ) ) ) ; cardLayout . show ( contentPane , "Main<seq2seq4repair_space>Options" ) ; } } } ) ; game . addKeyListener ( new KeyAdapter ( ) { @ Override public void keyReleased ( KeyEvent arg0 ) { if ( ( arg0 . getKeyCode ( ) ) == ( KeyEvent . VK_ESCAPE ) ) { int result = JOptionPane . showConfirmDialog ( null , "Are<seq2seq4repair_space>you<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>wish<seq2seq4repair_space>to<seq2seq4repair_space>exit<seq2seq4repair_space>the<seq2seq4repair_space>game?" , null , JOptionPane . YES_NO_OPTION ) ; if ( result == ( JOptionPane . YES_OPTION ) ) { CardLayout cardLayout = ( ( CardLayout ) ( contentPane . getLayout ( ) ) ) ; cardLayout . show ( contentPane , "Main<seq2seq4repair_space>Options" ) ; } } } } ) ; } }

Fix:
game = new GameConstructor ( gameOptions , contentPane ) ;
Buggy code:
public class RangeUtil { public static final int NO_FLAG = 0 ; public static final int LBRACE_MISSING = 1 ; public static final int IGNORE = 2 ; static class RangeResult { private static final int INITIAL_SIZE = 10 ; int pos ; int [ ] intervalStarts ; int [ ] intervalEnds ; int [ ] intervalFlags ; RangeResult ( ) { } void addInterval ( int start , int end ) { } void addInterval ( int start , int end , int flags ) { } int [ ] [ ] getRanges ( ) { } private void quickSort ( int [ ] list , int [ ] list2 , int [ ] list3 , int left , int right ) { int original_left = left ; int original_right = right ; <START_BUG> int mid = list [ ( ( left + right ) // 2 ) ] ; <END_BUG> do { while ( ( compare ( list [ left ] , mid ) ) < 0 ) { left ++ ; } while ( ( compare ( mid , list [ right ] ) ) < 0 ) { right -- ; } if ( left <= right ) { int tmp = list [ left ] ; list [ left ] = list [ right ] ; list [ right ] = tmp ; tmp = list2 [ left ] ; list2 [ left ] = list2 [ right ] ; list2 [ right ] = tmp ; tmp = list3 [ left ] ; list3 [ left ] = list3 [ right ] ; list3 [ right ] = tmp ; left ++ ; right -- ; } } while ( left <= right ) ; if ( original_left < right ) { quickSort ( list , list2 , list3 , original_left , right ) ; } if ( left < original_right ) { quickSort ( list , list2 , list3 , left , original_right ) ; } } private int compare ( int i1 , int i2 ) { } } public static boolean containsErrorInSignature ( AbstractMethodDeclaration method ) { } public static int [ ] [ ] computeDietRange ( TypeDeclaration [ ] types ) { } private static void computeDietRange0 ( TypeDeclaration [ ] types , RangeUtil . RangeResult result ) { } public static boolean containsIgnoredBody ( AbstractMethodDeclaration method ) { } }

Fix:
int mid = list [ ( left + ( ( right - left ) // 2 ) ) ] ;
Buggy code:
public class RestletApplication extends AbstractRestletApplication { @ Override protected AbstractStatusService createStatusService ( ) { } @ Override <START_BUG> protected void createInboundRoot ( Router router ) { <END_BUG> router . attach ( "//persons" , PersonsResource . class ) ; } }

Fix:
protected void createInboundRoot ( final Router router ) {
Buggy code:
public class XMLResultAggregator extends Task implements XMLConstants { protected Vector filesets = new Vector ( ) ; protected String toFile ; protected File toDir ; protected Vector transformers = new Vector ( ) ; public static final String DEFAULT_DIR = "." ; public static final String DEFAULT_FILENAME = "TESTS-TestSuites.xml" ; public AggregateTransformer createReport ( ) { } public void setTofile ( String value ) { } public void setTodir ( File value ) { } public void addFileSet ( FileSet fs ) { } public void execute ( ) throws BuildException { } protected File getDestinationFile ( ) { } protected File [ ] getFiles ( ) { } protected void writeDOMTree ( Document doc , File file ) throws IOException { OutputStream out = null ; PrintWriter wri = null ; try { out = new FileOutputStream ( file ) ; wri = new PrintWriter ( new OutputStreamWriter ( out , "UTF8" ) ) ; <START_BUG> wri . write ( "<?xml<seq2seq4repair_space>version=\"1.0\"?>\n" ) ; <END_BUG> new DOMElementWriter ( ) . write ( doc . getDocumentElement ( ) , wri , 0 , "<seq2seq4repair_space>" ) ; wri . flush ( ) ; if ( wri . checkError ( ) ) { throw new IOException ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>writing<seq2seq4repair_space>DOM<seq2seq4repair_space>content" ) ; } } finally { if ( wri != null ) { wri . close ( ) ; out = null ; } if ( out != null ) { out . close ( ) ; } } } protected Element createDocument ( ) { } protected void addTestSuite ( Element root , Element testsuite ) { } private static DocumentBuilder getDocumentBuilder ( ) { } }

Fix:
wri . write ( "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"<seq2seq4repair_space>?>\n" ) ;
Buggy code:
public class JavaSearchScope extends AbstractSearchScope { private ArrayList elements ; private IPath [ ] paths ; private boolean [ ] pathWithSubFolders ; private int pathsCount ; private IPath [ ] enclosingProjectsAndJars ; public JavaSearchScope ( ) { } private void addEnclosingProjectOrJar ( IPath path ) { } public void add ( IJavaProject javaProject , boolean includesPrereqProjects , HashSet visitedProjects ) throws JavaModelException { } public void add ( IJavaElement element ) throws JavaModelException { IPackageFragmentRoot root = null ; switch ( element . getElementType ( ) ) { case IJavaElement . JAVA_MODEL : break ; case IJavaElement . JAVA_PROJECT : this . add ( ( ( IJavaProject ) ( element ) ) , true , new HashSet ( 2 ) ) ; break ; case IJavaElement . PACKAGE_FRAGMENT_ROOT : root = ( ( IPackageFragmentRoot ) ( element ) ) ; this . add ( root . getPath ( ) , true ) ; break ; case IJavaElement . PACKAGE_FRAGMENT : root = ( ( IPackageFragmentRoot ) ( element . getParent ( ) ) ) ; if ( root . isArchive ( ) ) { this . add ( root . getPath ( ) . append ( new Path ( element . getElementName ( ) . replace ( '.' , '//' ) ) ) , false ) ; } else { <START_BUG> IResource resource = element . getUnderlyingResource ( ) ; <END_BUG> if ( ( resource != null ) && ( resource . isAccessible ( ) ) ) { this . add ( resource . getFullPath ( ) , false ) ; } } break ; default : if ( element instanceof IMember ) { if ( ( this . elements ) == null ) { this . elements = new ArrayList ( ) ; } this . elements . add ( element ) ; } this . add ( this . fullPath ( element ) , true ) ; IJavaElement parent = element . getParent ( ) ; while ( ( parent != null ) && ( ! ( parent instanceof IPackageFragmentRoot ) ) ) { parent = parent . getParent ( ) ; } if ( parent instanceof IPackageFragmentRoot ) { root = ( ( IPackageFragmentRoot ) ( parent ) ) ; } } if ( root != null ) { if ( ( root . getKind ( ) ) == ( IPackageFragmentRoot . K_BINARY ) ) { this . addEnclosingProjectOrJar ( root . getPath ( ) ) ; } else { this . addEnclosingProjectOrJar ( root . getJavaProject ( ) . getProject ( ) . getFullPath ( ) ) ; } } } private void add ( IPath path , boolean withSubFolders ) { } public boolean encloses ( String resourcePathString ) { } private boolean encloses ( IPath path ) { } public boolean encloses ( IJavaElement element ) { } public IPath [ ] enclosingProjectsAndJars ( ) { } private IPath fullPath ( IJavaElement element ) { } protected void initialize ( ) { } public void processDelta ( IJavaElementDelta delta ) { } public String toString ( ) { } }

Fix:
IResource resource = element . getResource ( ) ;
Buggy code:
public class AjaxInitializer implements IInitializer { public void init ( Application application ) { <START_BUG> PackageResource . bind ( application , AjaxBehavior . class , "wicket-ajax.js" ) ; <END_BUG> } }

Fix:
PackageResource . bind ( application , AbstractDefaultAjaxBehavior . class , "wicket-ajax.js" ) ;
Buggy code:
abstract class TermsWithScoreCollector extends Collector { private static final int INITIAL_ARRAY_SIZE = 256 ; final String field ; final BytesRefHash collectedTerms = new BytesRefHash ( ) ; final ScoreMode scoreMode ; Scorer scorer ; float [ ] scoreSums = new float [ TermsWithScoreCollector . INITIAL_ARRAY_SIZE ] ; TermsWithScoreCollector ( String field , ScoreMode scoreMode ) { } public BytesRefHash getCollectedTerms ( ) { } public float [ ] getScoresPerTerm ( ) { } @ Override public void setScorer ( Scorer scorer ) throws IOException { } @ Override public boolean acceptsDocsOutOfOrder ( ) { } static TermsWithScoreCollector create ( String field , boolean multipleValuesPerDocument , ScoreMode scoreMode ) { } static class SV extends TermsWithScoreCollector { final BytesRef spare = new BytesRef ( ) ; BinaryDocValues fromDocTerms ; SV ( String field , ScoreMode scoreMode ) { } @ Override public void collect ( int doc ) throws IOException { } @ Override public void setNextReader ( AtomicReaderContext context ) throws IOException { <START_BUG> fromDocTerms = DEFAULT . getTerms ( context . reader ( ) , field ) ; <END_BUG> } static class Avg extends TermsWithScoreCollector . SV { int [ ] scoreCounts = new int [ TermsWithScoreCollector . INITIAL_ARRAY_SIZE ] ; Avg ( String field ) { } @ Override public void collect ( int doc ) throws IOException { } @ Override public float [ ] getScoresPerTerm ( ) { } } } static class MV extends TermsWithScoreCollector { SortedSetDocValues fromDocTermOrds ; final BytesRef scratch = new BytesRef ( ) ; MV ( String field , ScoreMode scoreMode ) { } @ Override public void collect ( int doc ) throws IOException { } @ Override public void setNextReader ( AtomicReaderContext context ) throws IOException { fromDocTermOrds = DEFAULT . getDocTermOrds ( context . reader ( ) , field ) ; } static class Avg extends TermsWithScoreCollector . MV { int [ ] scoreCounts = new int [ TermsWithScoreCollector . INITIAL_ARRAY_SIZE ] ; Avg ( String field ) { } @ Override public void collect ( int doc ) throws IOException { } @ Override public float [ ] getScoresPerTerm ( ) { } } } }

Fix:
fromDocTerms = DEFAULT . getTerms ( context . reader ( ) , field , false ) ;
Buggy code:
final class MarkupFragmentFinder { private MarkupFragmentFinder ( ) { } static final MarkupStream find ( final Component component ) { MarkupContainer parentWithAssociatedMarkup = component . findParentWithAssociatedMarkup ( ) ; MarkupStream markupStream = null ; while ( true ) { markupStream = parentWithAssociatedMarkup . getAssociatedMarkupStream ( true ) ; if ( ( component . markupIndex ) != ( - 1 ) ) { try { markupStream . setCurrentIndex ( component . markupIndex ) ; MarkupElement elem = markupStream . get ( ) ; if ( elem instanceof ComponentTag ) { ComponentTag tag = ( ( ComponentTag ) ( elem ) ) ; if ( tag . getId ( ) . equals ( component . getId ( ) ) ) { return markupStream ; } } } catch ( IndexOutOfBoundsException ex ) { } } String relativePath = MarkupFragmentFinder . getComponentRelativePath ( component , parentWithAssociatedMarkup ) ; int index = markupStream . findComponentIndex ( relativePath , component . getId ( ) ) ; if ( index != ( - 1 ) ) { markupStream . setCurrentIndex ( index ) ; return markupStream ; } if ( parentWithAssociatedMarkup instanceof Border ) { parentWithAssociatedMarkup = parentWithAssociatedMarkup . findParentWithAssociatedMarkup ( ) ; } else { <START_BUG> throw new WicketRuntimeException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>the<seq2seq4repair_space>markup<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>component.<seq2seq4repair_space>That<seq2seq4repair_space>may<seq2seq4repair_space>be<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>transparent<seq2seq4repair_space>containers<seq2seq4repair_space>or<seq2seq4repair_space>components<seq2seq4repair_space>implementing<seq2seq4repair_space>IComponentResolver:<seq2seq4repair_space>" + ( component . toString ( ) ) ) ) ; <END_BUG> } markupStream = null ; } } private static String getComponentRelativePath ( final Component component , final MarkupContainer parentWithAssociatedMarkup ) { } }

Fix:
throw new WicketRuntimeException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>the<seq2seq4repair_space>markup<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>component.<seq2seq4repair_space>That<seq2seq4repair_space>may<seq2seq4repair_space>be<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>transparent<seq2seq4repair_space>containers<seq2seq4repair_space>or<seq2seq4repair_space>components<seq2seq4repair_space>implementing<seq2seq4repair_space>IComponentResolver:<seq2seq4repair_space>" + ( component . getId ( ) ) ) ) ;
Buggy code:
public class DateExtractor { public final List < KnownDate > knownMonths ; public final List < KnownDate > knownYears ; public final StringComparator comparator = new SumerianComparator ( ) ; final String yearStart = "mu" ; final String monthStart = "iti" ; public DateExtractor ( Connection conn ) throws SQLException { } public DateExtractor ( List < KnownDate > months , List < KnownDate > years ) { } public DateExtractor ( ) throws SQLException { } private List < KnownDate > readKnownMonths ( Connection conn ) throws SQLException { } public static List < KnownDate > readKnownYears ( Connection conn ) throws SQLException { } public void process ( Connection conn , TabletGroup t ) throws SQLException { } private void process ( Connection conn , Container input ) throws SQLException { } private void process ( Connection conn , TextSection s ) throws SQLException { } public FoundDate alignDateString ( String [ ] graphemes , SimilarityMatrix sim , boolean compare ) { } public List < GuessPair > alignYearsTest ( ) { } public List < GuessPair > alignYears ( List < FoundDate > toAlign , SimilarityMatrix sim ) { } public List < GuessPair > alignYears ( List < FoundDate > toAlign , SimilarityMatrix sim , boolean compare ) { } private FoundDate getConfidence ( String [ ] graphemes , int i , List < KnownDate > dates ) { } private FoundDate getConfidence ( String [ ] graphemes , int i , List < KnownDate > dates , SimilarityMatrix sim , boolean compare ) { KnownDate guess = null ; Confidence confd = new Confidence ( Integer . MAX_VALUE , ( - 1 ) ) ; int bestIndex = 0 ; double [ ] conf = new double [ 1 ] ; int [ ] indx = new int [ 1 ] ; int [ ] dist = new int [ 1 ] ; double [ ] conf2 = new double [ 1 ] ; int [ ] indx2 = new int [ 1 ] ; int [ ] dist2 = new int [ 1 ] ; String [ ] found = this . separateDeterminants ( graphemes ) ; double levConf = 0 ; for ( KnownDate d : dates ) { String known = this . separateDeterminants ( d . text ) ; <START_BUG> SumerianNWSubstringComparator . compareNoCutoff ( known , found , i , conf , indx , dist , sim ) ; <END_BUG> if ( compare ) { SumerianLevenstheinSubstringComparator . compare ( known , found , i , conf2 , indx2 , dist2 ) ; if ( ( conf2 [ 0 ] ) > levConf ) { levConf = conf2 [ 0 ] ; } } if ( ( conf [ 0 ] ) > ( confd . confidence ) ) { bestIndex = indx [ 0 ] ; confd = new Confidence ( dist [ 0 ] , conf [ 0 ] ) ; guess = d ; } } if ( compare ) { System . out . println ( ( ( ( ( ( "lev:" + levConf ) + "<seq2seq4repair_space>NW:" ) + ( confd . confidence ) ) + "<seq2seq4repair_space>diff:" ) + ( ( confd . confidence ) - levConf ) ) ) ; } String output = "" ; for ( int j = 0 ; j < bestIndex ; j ++ ) { if ( ( output . isEmpty ( ) ) == false ) output += "<seq2seq4repair_space>" ; output += found [ ( j + i ) ] ; } return new FoundDate ( guess , output , confd ) ; } private String separateDeterminants ( String text ) { } public String [ ] separateDeterminants ( String [ ] graphemes ) { } No newline ; at end ; of file ; }

Fix:
SumerianNWSubstringComparator . compare ( known , found , i , conf , indx , dist , sim ) ;
Buggy code:
public class AMChatRouter { AMChat amcMain ; public AMChatRouter ( AMChat amChat ) { } public void AMChatEvent ( PlayerChatEvent event ) { } public void toLocal ( Player sender , String message ) { Location origin = sender . getLocation ( ) ; for ( Player player : Bukkit . getOnlinePlayers ( ) ) { <START_BUG> if ( ( ( player . hasPermission ( "amchat.local.hearall" ) ) || ( player . isOp ( ) ) ) || ( ( amcMain . limitChat ( ) ) && ( ( amcMain . amcTools . getDistance ( origin , player . getLocation ( ) ) ) < ( amcMain . getMaxChat ( ) ) ) ) ) { <END_BUG> player . sendMessage ( message ) ; } else if ( ! ( amcMain . limitChat ( ) ) ) { player . sendMessage ( message ) ; } } } public void toRadio ( Player sender , String message ) { } public boolean isLoaded ( AMChat amcMainPlugin ) { } }

Fix:
if ( ( ( player . hasPermission ( "amchat.local.hearall" ) ) || ( player . isOp ( ) ) ) || ( ( ( amcMain . limitChat ( ) ) && ( sender . getWorld ( ) . equals ( player . getWorld ( ) ) ) ) && ( ( amcMain . amcTools . getDistance ( origin , player . getLocation ( ) ) ) < ( amcMain . getMaxChat ( ) ) ) ) ) {
Buggy code:
public abstract class Socket { public static final String SOCKET_ERROR = "[SOCKET-ERROR]<seq2seq4repair_space>" ; protected String host ; protected int port ; protected String gsmApn ; protected String gsmUser ; protected String gsmPass ; protected String gsmPin ; protected String provPin ; public boolean socketCorrupted = true ; protected Socket ( String hostName , int port ) { } @ SuppressWarnings ( "unused" ) public void initSocket ( ) { } public void releaseSocket ( ) { releaseUnderlyingSocketMediumGuaranteed ( ) ; <START_BUG> Log . infoLog ( ( ( ( ( "COMPLETE<seq2seq4repair_space>[TCP-SOCKET]<seq2seq4repair_space>STRUCTURE,<seq2seq4repair_space>INCLUDING<seq2seq4repair_space>THE<seq2seq4repair_space>UNDERLYING<seq2seq4repair_space>MEDIUM<seq2seq4repair_space>CLEANED<seq2seq4repair_space>FOR<seq2seq4repair_space>HOST<seq2seq4repair_space>=<seq2seq4repair_space>[" + ( InstaMsg . INSTAMSG_HOST ) ) + "],<seq2seq4repair_space>PORT<seq2seq4repair_space>=<seq2seq4repair_space>[" ) + ( InstaMsg . INSTAMSG_PORT ) ) + "]." ) ) ; <END_BUG> } public abstract String getLatestSmsContainingSubstring ( String substring ) { } public abstract void connectUnderlyingSocketMediumTryOnce ( ) { } public abstract ReturnCode socketRead ( byte [ ] buffer , int len , boolean guaranteed ) { } public abstract ReturnCode socketWrite ( byte [ ] buffer , int len ) { } public abstract void releaseUnderlyingSocketMediumGuaranteed ( ) { } }

Fix:
Log . infoLog ( ( ( ( ( "COMPLETE<seq2seq4repair_space>[TCP-SOCKET]<seq2seq4repair_space>STRUCTURE,<seq2seq4repair_space>INCLUDING<seq2seq4repair_space>THE<seq2seq4repair_space>UNDERLYING<seq2seq4repair_space>MEDIUM<seq2seq4repair_space>CLEANED<seq2seq4repair_space>FOR<seq2seq4repair_space>HOST<seq2seq4repair_space>=<seq2seq4repair_space>[" + ( DeviceConstants . INSTAMSG_HOST ) ) + "],<seq2seq4repair_space>PORT<seq2seq4repair_space>=<seq2seq4repair_space>[" ) + ( InstaMsg . INSTAMSG_PORT ) ) + "]." ) ) ;
Buggy code:
public class Model extends GeneralizableElementImpl implements Package { public Model ( ) { } public Model ( Name name ) { } public Model ( String nameStr ) { } public Vector _referencedElement ; public Vector getReferencedElement ( ) { } public void setReferencedElement ( Vector x ) throws PropertyVetoException { if ( ( _referencedElement ) == null ) _referencedElement = new Vector ( ) ; <START_BUG> fireVetoableChange ( "referencedElemement" , _referencedElement , x ) ; <END_BUG> _referencedElement = x ; } public void addReferencedElement ( ModelElement x ) throws PropertyVetoException { } public void removeReferencedElement ( ModelElement x ) throws PropertyVetoException { } }

Fix:
fireVetoableChangeNoCompare ( "referencedElemement" , _referencedElement , x ) ;
Buggy code:
class Task { TaskStack mStack ; final AppTokenList mAppTokens = new AppTokenList ( ) ; final int taskId ; final int mUserId ; boolean mDeferRemoval = false ; Task ( AppWindowToken wtoken , TaskStack stack , int userId ) { } DisplayContent getDisplayContent ( ) { } void addAppToken ( int addPos , AppWindowToken wtoken ) { } boolean removeAppToken ( AppWindowToken wtoken ) { } void setSendingToBottom ( boolean toBottom ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( "{taskId=" + ( taskId ) ) + "<seq2seq4repair_space>appTokens=" ) + ( mAppTokens ) ) + "}" ; <END_BUG> } }

Fix:
return ( ( ( ( ( "{taskId=" + ( taskId ) ) + "<seq2seq4repair_space>appTokens=" ) + ( mAppTokens ) ) + "<seq2seq4repair_space>mdr=" ) + ( mDeferRemoval ) ) + "}" ;
Buggy code:
public class SimpleBroadcaster extends DefaultBroadcaster { private static final Logger logger = LoggerFactory . getLogger ( SimpleBroadcaster . class ) ; public SimpleBroadcaster ( String id , AtmosphereServlet . AtmosphereConfig config ) { } @ Override protected BroadcasterConfig createBroadcasterConfig ( AtmosphereServlet . AtmosphereConfig config ) { BroadcasterConfig bc = ( ( BroadcasterConfig ) ( config . properties ( ) . get ( BroadcasterConfig . class . getName ( ) ) ) ) ; if ( bc == null ) { <START_BUG> bc = new BroadcasterConfig ( AtmosphereServlet . broadcasterFilters , config ) ; <END_BUG> config . properties ( ) . put ( BroadcasterConfig . class . getName ( ) , bc ) ; } return bc ; } protected void start ( ) { } @ Override public void setBroadcasterConfig ( BroadcasterConfig bc ) { } @ Override public < T > Future < T > broadcast ( T msg ) { } @ Override public < T > Future < T > broadcast ( T msg , AtmosphereResource < ? , ? > r ) { } @ Override public < T > Future < T > broadcast ( T msg , Set < AtmosphereResource < ? , ? > > subset ) { } @ Override protected void queueWriteIO ( AtmosphereResource < ? , ? > r , Object finalMsg , Entry entry ) throws InterruptedException { } No newline ; at end ; of file ; }

Fix:
bc = new BroadcasterConfig ( AtmosphereServlet . broadcasterFilters , config , false ) ;
Buggy code:
public class HangmanApplication extends WicketExampleApplication { public HangmanApplication ( ) { } @ Override public ISessionFactory getSessionFactory ( ) { return new ISessionFactory ( ) { <START_BUG> public Session newSession ( Request request ) { <END_BUG> return new HangmanSession ( HangmanApplication . this ) ; } } ; } @ Override public Class < ? extends Page > getHomePage ( ) { } }

Fix:
public Session newSession ( final Request request ) {
Buggy code:
public class DefaultServlet extends HttpServlet { private static final String datePattern = "EEE,<seq2seq4repair_space>dd<seq2seq4repair_space>MMM<seq2seq4repair_space>yyyyy<seq2seq4repair_space>HH:mm<seq2seq4repair_space>z" ; private static final DateFormat dateFormat = new SimpleDateFormat ( DefaultServlet . datePattern ) ; ServletContext contextF ; private Context context ; String docBase ; int debug = 0 ; public void init ( ) throws ServletException { contextF = getServletContext ( ) ; context = ( ( ServletContextFacade ) ( getServletContext ( ) ) ) . getRealContext ( ) ; docBase = context . getDocBase ( ) ; if ( ! ( docBase . endsWith ( "//" ) ) ) { docBase += "//" ; } <START_BUG> if ( ! ( new File ( docBase ) . isAbsolute ( ) ) ) <END_BUG> docBase = ( ( context . getContextManager ( ) . getHome ( ) ) + "//" ) + ( docBase ) ; String dbg = getServletConfig ( ) . getInitParameter ( "debug" ) ; if ( dbg != null ) debug = 1 ; } public String getServletInfo ( ) { } public void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } private String getWelcomeFile ( File file ) { } private void serveFile ( File file , HttpServletRequest request , HttpServletResponse response ) throws IOException { } private void serveStream ( InputStream in , HttpServletRequest request , HttpServletResponse response ) throws IOException { } private void serveStreamAsStream ( InputStream in , OutputStream out ) throws IOException { } private void serveStreamAsWriter ( InputStream in , PrintWriter out ) throws IOException { } private boolean isFileMasked ( String docBase , String requestedFile ) { } private boolean isDirMasked ( String basedir , String subdir ) { } private void serveDir ( File file , HttpServletRequest request , HttpServletResponse response ) throws IOException { } }

Fix:
if ( ! ( FileUtil . isAbsolute ( docBase ) ) )
Buggy code:
public class DateDV extends DateTimeDV { public Object getActualValue ( String content ) throws InvalidDatatypeValueException { try { <START_BUG> return parse ( content ) ; <END_BUG> } catch ( Exception ex ) { throw new InvalidDatatypeValueException ( "cvc-datatype-valid.1.2.1" , new Object [ ] { content , "date" } ) ; } } protected int [ ] parse ( String str ) throws SchemaDateTimeException { } }

Fix:
return new DateTimeData ( parse ( content ) , this ) ;