nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Path ( "//tv//download//{show}//{season}//{episode}" ) public class TVEpisodeDownload { private static final Logger logger = Logger . getLogger ( TVEpisodeDownload . class ) ; @ Resource private UserTransaction utx ; @ PersistenceContext private EntityManager em ; @ GET @ Produces ( MediaType . APPLICATION_JSON ) public Response download ( @ PathParam ( "show" ) Integer showId , @ PathParam ( "season" ) Integer seasonNo , @ PathParam ( "episode" ) Integer episodeNo ) { TVShow show = em . find ( TVShow . class , showId ) ; if ( show != null ) { Episode episode = new Episode ( show . getName ( ) , seasonNo , episodeNo ) ; for ( java . nio . file . Path path : episode . possiblePaths ( ApplicationProperties . getTVShowDir ( ) ) ) { if ( Files . exists ( path ) ) { try { return Response . ok ( ) . entity ( new JSONObject ( ) . put ( "status" , "error" ) . put ( "message" , "File<seq2seq4repair_space>already<seq2seq4repair_space>exists" ) . toString ( ) ) . build ( ) ; } catch ( JSONException e ) { TVEpisodeDownload . logger . warn ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>build<seq2seq4repair_space>json<seq2seq4repair_space>response" , e ) ; return Response . status ( NOT_MODIFIED ) . build ( ) ; } } } return TVEpisodeDownload . download ( show , episode , utx , em ) ; } else { try { JSONObject data = JsonAPICaller . get ( new MovieDBAPI ( ) . tvshowDetails ( showId ) ) ; <START_BUG> show = new TVShow ( data ) ; <END_BUG> Episode episode = new Episode ( show . getName ( ) , seasonNo , episodeNo ) ; for ( java . nio . file . Path path : episode . possiblePaths ( ApplicationProperties . getTVShowDir ( ) ) ) { if ( Files . exists ( path ) ) { try { return Response . ok ( ) . entity ( new JSONObject ( ) . put ( "status" , "error" ) . put ( "message" , "File<seq2seq4repair_space>already<seq2seq4repair_space>exists" ) . toString ( ) ) . build ( ) ; } catch ( JSONException e ) { TVEpisodeDownload . logger . warn ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>build<seq2seq4repair_space>json<seq2seq4repair_space>response" , e ) ; return Response . status ( NOT_MODIFIED ) . build ( ) ; } } } return TVEpisodeDownload . download ( show , episode , utx , em ) ; } catch ( Exception e ) { TVEpisodeDownload . logger . error ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>download<seq2seq4repair_space>episode<seq2seq4repair_space>for<seq2seq4repair_space>added<seq2seq4repair_space>TV<seq2seq4repair_space>show" , e ) ; return Response . serverError ( ) . build ( ) ; } } } public static Response download ( TVShow show , Episode episode , UserTransaction utx , EntityManager em ) { } public static Response download ( final TVTorrent torrent , final Episode episode , UserTransaction utx , EntityManager em ) { } }

Fix:
show = new TVShow ( data , false ) ;
Buggy code:
public class BookmarkablePageRequestTarget implements IBookmarkablePageRequestTarget , IAccessChecker { private final Class pageClass ; private final PageParameters pageParameters ; private Page page ; private final String pageMapName ; public BookmarkablePageRequestTarget ( Class pageClass ) { } public BookmarkablePageRequestTarget ( String pageMapName , Class pageClass ) { } public BookmarkablePageRequestTarget ( Class pageClass , PageParameters pageParameters ) { } public BookmarkablePageRequestTarget ( String pageMapName , Class pageClass , PageParameters pageParameters ) { } public boolean synchronizeOnSession ( RequestCycle requestCycle ) { } public boolean checkAccess ( RequestCycle requestCycle ) { } private final Page getPage ( RequestCycle requestCycle ) { } protected Page newPage ( Class pageClass , RequestCycle requestCycle ) { } public void respond ( RequestCycle requestCycle ) { if ( ( pageClass ) != null ) { if ( requestCycle . getRedirect ( ) ) { IRequestCycleProcessor processor = requestCycle . getRequestCycleProcessor ( ) ; String redirectUrl = processor . getRequestEncoder ( ) . encode ( requestCycle , new BookmarkablePageRequestTarget ( pageClass , pageParameters ) ) ; requestCycle . getResponse ( ) . redirect ( redirectUrl ) ; } else { <START_BUG> requestCycle . setUpdateCluster ( true ) ; <END_BUG> page = getPage ( requestCycle ) ; page . doRender ( ) ; } } } public void cleanUp ( RequestCycle requestCycle ) { } public final Class getPageClass ( ) { } public final PageParameters getPageParameters ( ) { } public final String getPageMapName ( ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { } }

Fix:
requestCycle . setUpdateSession ( true ) ;
Buggy code:
public final class ActiveShellSourceProvider extends AbstractSourceProvider { private static final String [ ] PROVIDED_SOURCE_NAMES = new String [ ] { ISources . ACTIVE_SHELL_NAME , ISources . ACTIVE_WORKBENCH_WINDOW_NAME , ISources . ACTIVE_WORKBENCH_WINDOW_SHELL_NAME } ; private final Display display ; private Shell lastActiveShell = null ; private Shell lastActiveWorkbenchWindowShell = null ; private final Listener listener = new Listener ( ) { public final void handleEvent ( final Event event ) { } } ; private final IWorkbench workbench ; public ActiveShellSourceProvider ( final IWorkbench workbench ) { } public final void dispose ( ) { } public final Map getCurrentState ( ) { final Map currentState = new HashMap ( 4 ) ; final Shell newActiveShell = display . getActiveShell ( ) ; currentState . put ( ACTIVE_SHELL_NAME , newActiveShell ) ; <START_BUG> final IContextService contextService = ( ( IContextService ) ( workbench . getAdapter ( IContextService . class ) ) ) ; <END_BUG> final int shellType = contextService . getShellType ( newActiveShell ) ; if ( shellType != ( IContextService . TYPE_DIALOG ) ) { final IWorkbenchWindow newActiveWorkbenchWindow = workbench . getActiveWorkbenchWindow ( ) ; final Shell newActiveWorkbenchWindowShell ; if ( newActiveWorkbenchWindow == null ) { newActiveWorkbenchWindowShell = null ; } else { newActiveWorkbenchWindowShell = newActiveWorkbenchWindow . getShell ( ) ; } currentState . put ( ACTIVE_WORKBENCH_WINDOW_NAME , newActiveWorkbenchWindow ) ; currentState . put ( ACTIVE_WORKBENCH_WINDOW_SHELL_NAME , newActiveWorkbenchWindowShell ) ; } return currentState ; } public final String [ ] getProvidedSourceNames ( ) { } }

Fix:
final IContextService contextService = ( ( IContextService ) ( workbench . getService ( IContextService . class ) ) ) ;
Buggy code:
public class DeploymentDependenciesProcessor implements DeploymentUnitProcessor { private static final QName ROOT_1_0 = new QName ( DeploymentDependenciesParserV_1_0 . NAMESPACE_1_0 , "jboss-deployment-dependencies" ) ; public static void registerJBossXMLParsers ( ) { <START_BUG> DeployerChainAddHandler . addDeploymentProcessor ( SERVER_NAME , STRUCTURE , STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER , new org . jboss . as . server . deployment . jbossallxml . JBossAllXmlParserRegisteringProcessor < DeploymentDependencies > ( DeploymentDependenciesProcessor . ROOT_1_0 , DeploymentDependencies . ATTACHMENT_KEY , DeploymentDependenciesParserV_1_0 . INSTANCE ) ) ; <END_BUG> } @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void processDependencies ( final DeploymentPhaseContext phaseContext , final DeploymentUnit deploymentUnit ) { } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
DeployerChainAddHandler . addDeploymentProcessor ( SERVER_NAME , STRUCTURE , STRUCTURE_REGISTER_JBOSS_ALL_DEPLOYMENT_DEPS , new org . jboss . as . server . deployment . jbossallxml . JBossAllXmlParserRegisteringProcessor < DeploymentDependencies > ( DeploymentDependenciesProcessor . ROOT_1_0 , DeploymentDependencies . ATTACHMENT_KEY , DeploymentDependenciesParserV_1_0 . INSTANCE ) ) ;
Buggy code:
public final class SplashScreen extends Activity { private static final int SPLASH_DISPLAY_LENGTH = 500 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_splash ) ; new Handler ( ) . postDelayed ( new Runnable ( ) { @ Override public void run ( ) { <START_BUG> if ( true ) { <END_BUG> nextActivity ( ) ; } } } , SplashScreen . SPLASH_DISPLAY_LENGTH ) ; } @ Override protected void onActivityResult ( final int _requestCode , final int _resultCode , Intent data ) { } private final void nextActivity ( ) { } }

Fix:
if ( MeteoBluetoothManager . getInstance ( ) . bluetoothEnable ( SplashScreen . this ) ) {
Buggy code:
public class TelnetServer implements TtyCodes { private static final Logger logger = Logger . getLogger ( TelnetServer . class . getName ( ) ) ; private final TelnetListener listener ; private final TelnetActivationSpec spec ; private final int port ; private final Map < String , Cmd > cmds = new TreeMap < String , Cmd > ( ) ; private final AtomicBoolean running = new AtomicBoolean ( ) ; private final ServerSocket serverSocket ; public TelnetServer ( TelnetActivationSpec spec , TelnetListener listener , int port ) throws IOException { } public TelnetListener getListener ( ) { } public void activate ( ) throws IOException { } public void deactivate ( ) throws IOException { } public void session ( Socket socket ) throws IOException { } private static void close ( Closeable closeable ) { } protected void prompt ( DataInputStream in , PrintStream out ) throws TelnetServer . StopException { } public class BuiltInCmd extends Cmd { public BuiltInCmd ( String name , Method method ) { } @ Override public void exec ( Object impl , String [ ] args , PrintStream out ) throws Throwable { } } public String help ( String arg ) { final StringBuilder sb = new StringBuilder ( ) ; if ( arg == null ) { for ( String s : cmds . keySet ( ) ) { sb . append ( s ) . append ( "\n" ) ; } } else { final Cmd cmd = cmds . get ( arg ) ; if ( cmd == null ) { <START_BUG> sb . append ( "Unknown<seq2seq4repair_space>command:<seq2seq4repair_space>" ) . append ( arg ) ; <END_BUG> } else { final Method method = cmd . getMethod ( ) ; sb . append ( cmd . getName ( ) ) . append ( "<seq2seq4repair_space>" ) ; final Class < ? > [ ] types = method . getParameterTypes ( ) ; for ( Class < ? > type : types ) { sb . append ( "<" ) . append ( type . getSimpleName ( ) . toLowerCase ( ) ) . append ( ">" ) . append ( "<seq2seq4repair_space>" ) ; } if ( ( types . length ) == 0 ) { sb . append ( "[no<seq2seq4repair_space>options]" ) ; } } } return sb . toString ( ) ; } public void exit ( ) throws TelnetServer . StopException { } public static class StopException extends Exception { public StopException ( ) { } public StopException ( Throwable cause ) { } } }

Fix:
sb . append ( "Unkown<seq2seq4repair_space>command:<seq2seq4repair_space>" ) . append ( arg ) ;
Buggy code:
public class CLIAccessControl { private static final Logger log = Logger . getLogger ( CLIAccessControl . class ) ; public static boolean isExecute ( ModelControllerClient client , OperationRequestAddress address , String operation ) { } public static boolean isExecute ( ModelControllerClient client , String [ ] parent , OperationRequestAddress address , String operation ) { final ModelNode accessControl = CLIAccessControl . getAccessControl ( client , parent , address , true ) ; if ( accessControl == null ) { return false ; } if ( ! ( accessControl . has ( DEFAULT ) ) ) { CLIAccessControl . log . warn ( ( "access-control<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>defaults:<seq2seq4repair_space>" + accessControl ) ) ; return false ; } final ModelNode defaults = accessControl . get ( DEFAULT ) ; if ( ! ( defaults . has ( OPERATIONS ) ) ) { <START_BUG> CLIAccessControl . log . warn ( ( "access-control//default<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>operations:<seq2seq4repair_space>" + accessControl ) ) ; <END_BUG> return false ; } final ModelNode operations = defaults . get ( OPERATIONS ) ; if ( ! ( operations . has ( operation ) ) ) { if ( CLIAccessControl . log . isTraceEnabled ( ) ) { CLIAccessControl . log . trace ( ( "The<seq2seq4repair_space>operation<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>description:<seq2seq4repair_space>" + operation ) ) ; } return false ; } final ModelNode opAC = operations . get ( operation ) ; if ( ! ( opAC . has ( EXECUTE ) ) ) { CLIAccessControl . log . warn ( ( ( ( "'execute'<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>for<seq2seq4repair_space>" + operation ) + "<seq2seq4repair_space>in<seq2seq4repair_space>" ) + accessControl ) ) ; return false ; } return opAC . get ( EXECUTE ) . asBoolean ( ) ; } public static ModelNode getAccessControl ( ModelControllerClient client , OperationRequestAddress address , boolean operations ) { } public static ModelNode getAccessControl ( ModelControllerClient client , String [ ] parent , OperationRequestAddress address , boolean operations ) { } private static void setAddress ( ModelNode request , String [ ] parent , OperationRequestAddress address ) { } }

Fix:
CLIAccessControl . log . warn ( ( "access-control//default<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>operations:<seq2seq4repair_space>" + defaults ) ) ;
Buggy code:
public class Book implements Serializable { private String title ; public Book ( final String title ) { } public String getTitle ( ) { } <START_BUG> public void setTitle ( String title ) { <END_BUG> this . title = title ; } }

Fix:
public void setTitle ( final String title ) {
Buggy code:
public class PrimeFactors { List primeList ; public PrimeFactors ( ) { } public List < Integer > generatePrimes ( int number ) { for ( int i = 2 ; i <= number ; i ++ ) { <START_BUG> if ( ( number % i ) == 0 ) { <END_BUG> primeList . add ( i ) ; number //= i ; } } System . out . println ( primeList ) ; return primeList ; } }

Fix:
while ( ( number % i ) == 0 ) {
Buggy code:
public class DistributionWebFailoverTestCase extends ClusteredWebFailoverAbstractCase { @ Deployment ( name = ClusteringTestConstants . DEPLOYMENT_1 , managed = false , testable = false ) @ TargetsContainer ( ClusteringTestConstants . CONTAINER_1 ) public static Archive < ? > deployment0 ( ) { } @ Deployment ( name = ClusteringTestConstants . DEPLOYMENT_2 , managed = false , testable = false ) @ TargetsContainer ( ClusteringTestConstants . CONTAINER_2 ) public static Archive < ? > deployment1 ( ) { } private static Archive < ? > createDeployment ( ) { WebArchive war = ShrinkWrap . create ( WebArchive . class , "distributable.war" ) ; war . addClass ( SimpleServlet . class ) ; war . setWebXML ( ClusteredWebSimpleTestCase . class . getPackage ( ) , "web.xml" ) ; war . addAsWebInfResource ( ClusteredWebSimpleTestCase . class . getPackage ( ) , "jboss-web_dist.xml" , "jboss-web.xml" ) ; war . addClasses ( ViewChangeListenerServlet . class , ViewChangeListener . class , ViewChangeListenerBean . class ) ; war . setManifest ( new StringAsset ( "Manifest-Version:<seq2seq4repair_space>1.0\nDependencies:<seq2seq4repair_space>org.jboss.msc,<seq2seq4repair_space>org.jboss.as.clustering.common,<seq2seq4repair_space>org.infinispan\n" ) ) ; <START_BUG> System . out . println ( war . toString ( true ) ) ; <END_BUG> return war ; } }

Fix:
log . info ( war . toString ( true ) ) ;
Buggy code:
public class Footprint { private Matrix transform ; public Paint paint ; public Point position ; public boolean flipped = false ; public Footprint ( Point position ) { } public void update ( float timeSinceLastFrame , float moveFactor , float beltHeight ) { position . y += ( ( int ) ( moveFactor ) ) ; if ( ( position . y ) > ( ( beltHeight // 4.0F ) * 3.0F ) ) position . y = ( ( int ) ( ( - beltHeight ) // 4.0F ) ) ; else if ( ( position . y ) < ( ( - beltHeight ) // 4.0F ) ) { position . y = ( ( int ) ( ( beltHeight // 4.0F ) * 3.0F ) ) ; } int alpha = paint . getAlpha ( ) ; <START_BUG> alpha -= timeSinceLastFrame * 5.0F ; <END_BUG> paint . setAlpha ( alpha ) ; } public void draw ( Canvas canvas , Bitmap bmp ) { } No newline ; at end ; of file ; }

Fix:
alpha -= timeSinceLastFrame * 40.0F ;
Buggy code:
public class Util { public static void debugCheck ( boolean condition , RuntimeException e ) { <START_BUG> if ( ( BuildConfig . DEBUG ) && condition ) <END_BUG> throw e ; } }

Fix:
if ( ( BuildConfig . DEBUG ) && ( ! condition ) )
Buggy code:
public class ClassLiteralAccess extends Expression { public TypeReference type ; public TypeBinding targetType ; FieldBinding syntheticField ; public ClassLiteralAccess ( int sourceEnd , TypeReference type ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { SourceTypeBinding sourceType = currentScope . outerMostMethodScope ( ) . enclosingSourceType ( ) ; <START_BUG> if ( ( ! ( ( sourceType . isInterface ( ) ) || ( sourceType . isBaseType ( ) ) ) ) && ( ( currentScope . compilerOptions ( ) . sourceLevel ) <= ( ClassFileConstants . JDK1_5 ) ) ) { <END_BUG> syntheticField = sourceType . addSyntheticFieldForClassLiteral ( targetType , currentScope ) ; } return flowInfo ; } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } }

Fix:
if ( ( ! ( ( sourceType . isInterface ( ) ) || ( sourceType . isBaseType ( ) ) ) ) && ( ( currentScope . compilerOptions ( ) . sourceLevel ) < ( ClassFileConstants . JDK1_5 ) ) ) {
Buggy code:
public class ActionActivityDiagram extends UMLChangeAction { public static ActionActivityDiagram SINGLETON = new ActionActivityDiagram ( ) ; public ActionActivityDiagram ( ) { } public void actionPerformed ( ActionEvent ae ) { ProjectBrowser pb = ProjectBrowser . TheInstance ; Project p = pb . getProject ( ) ; try { <START_BUG> MModelElement me = ( ( MModelElement ) ( pb . getDetailsTarget ( ) ) ) ; <END_BUG> if ( ! ( ( me instanceof MNamespace ) && ( ( me instanceof MUseCase ) || ( me instanceof MClass ) ) ) ) { JOptionPane . showMessageDialog ( null , "You<seq2seq4repair_space>need<seq2seq4repair_space>to<seq2seq4repair_space>have<seq2seq4repair_space>a<seq2seq4repair_space>class<seq2seq4repair_space>or<seq2seq4repair_space>use<seq2seq4repair_space>case<seq2seq4repair_space>as<seq2seq4repair_space>your<seq2seq4repair_space>target<seq2seq4repair_space>in<seq2seq4repair_space>order<seq2seq4repair_space>to\nspecify<seq2seq4repair_space>for<seq2seq4repair_space>what<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>define<seq2seq4repair_space>a<seq2seq4repair_space>behaviour<seq2seq4repair_space>for." , "Warning" , JOptionPane . WARNING_MESSAGE ) ; return ; } MNamespace ns = ( ( MNamespace ) ( me ) ) ; String contextNameStr = ns . getName ( ) ; if ( contextNameStr == null ) contextNameStr = "untitled" ; MActivityGraph am = new MActivityGraphImpl ( ) ; am . setUUID ( UUIDManager . SINGLETON . getNewUUID ( ) ) ; am . setName ( ( contextNameStr + "ActivityGraph" ) ) ; MCompositeState cs = new MCompositeStateImpl ( ) ; cs . setName ( "activities_top" ) ; am . setNamespace ( ns ) ; am . setTop ( cs ) ; ns . addBehavior ( am ) ; UMLActivityDiagram d = new UMLActivityDiagram ( ns , am ) ; p . addMember ( d ) ; TheInstance . getNavPane ( ) . addToHistory ( d ) ; pb . setTarget ( d ) ; } catch ( PropertyVetoException pve ) { System . out . println ( "PropertyVetoException<seq2seq4repair_space>in<seq2seq4repair_space>ActionActivityDiagram" ) ; } super . actionPerformed ( ae ) ; } public boolean shouldBeEnabled ( ) { } }

Fix:
Object me = pb . getDetailsTarget ( ) ;
Buggy code:
public class ParsedServiceDeploymentProcessor implements DeploymentUnitProcessor { public static final long PRIORITY = INSTALL_SERVICES . plus ( 101L ) ; public static final Logger log = Logger . getLogger ( "org.jboss.as.deployment.service" ) ; public void processDeployment ( DeploymentUnitContext context ) throws DeploymentUnitProcessingException { final JBossServiceXmlDescriptor serviceXmlDescriptor = context . getAttachment ( ATTACHMENT_KEY ) ; if ( serviceXmlDescriptor == null ) return ; final Module module = context . getAttachment ( MODULE_ATTACHMENT_KEY ) ; if ( module == null ) <START_BUG> throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>module<seq2seq4repair_space>attachment<seq2seq4repair_space>for<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( context . getName ( ) ) ) , null ) ; <END_BUG> final ClassLoader classLoader = module . getClassLoader ( ) ; final Value < ClassLoader > classLoaderValue = Values . immediateValue ( classLoader ) ; final JBossServiceXmlDescriptor . ControllerMode controllerMode = serviceXmlDescriptor . getControllerMode ( ) ; final List < JBossServiceConfig > serviceConfigs = serviceXmlDescriptor . getServiceConfigs ( ) ; final BatchBuilder batchBuilder = context . getBatchBuilder ( ) ; for ( final JBossServiceConfig serviceConfig : serviceConfigs ) { addService ( batchBuilder , serviceConfig , classLoaderValue ) ; } } private void addService ( final BatchBuilder batchBuilder , final JBossServiceConfig serviceConfig , final Value < ClassLoader > classLoaderValue ) { } private Injector < Object > getPropertyInjector ( final Value < Class < ? > > classValue , final String propertyName , final JBossService < ? > jBossService , final Value < ? > value ) { } private ServiceName convert ( final String name ) { } private < T > Value < T > cached ( final Value < T > value ) { } private static class AttributeValue < T > implements Value < T > { private final Value < Class < ? > > targetClassValue ; private final String name ; private final String value ; private AttributeValue ( Value < Class < ? > > targetClassValue , String name , String value ) { } @ Override public T getValue ( ) throws IllegalStateException { } } private static class ArgumentValue < T > implements Value < T > { private final Value < Class < ? > > typeValue ; private final String value ; private ArgumentValue ( final Value < Class < ? > > typeValue , final String value ) { } @ Override public T getValue ( ) throws IllegalStateException { } } }

Fix:
throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>module<seq2seq4repair_space>attachment<seq2seq4repair_space>for<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( context . getName ( ) ) ) ) ;
Buggy code:
@ Controller @ Scope ( BeanDefinition . SCOPE_PROTOTYPE ) public class EmployeeController extends AbstractController { private static final Logger logger = LoggerFactory . getLogger ( EmployeeController . class ) ; @ Autowired private EmployeeService employeeService ; @ Autowired private PayrollService payrollService ; @ FXML private TextField employeeNumberField ; @ FXML private TextField nicknameField ; @ FXML private TextField lastNameField ; @ FXML private TextField firstNameField ; @ FXML private TextField middleNameField ; @ FXML private DatePicker birthdayDatePicker ; @ FXML private TextField addressField ; @ FXML private TextField contactNumberField ; @ FXML private TextField sssNumberField ; @ FXML private TextField philHealthNumberField ; @ FXML private TextField pagibigNumberField ; @ FXML private TextField tinField ; @ FXML private TextField atmAccountNumberField ; @ FXML private TextField magicCustomerCodeField ; @ FXML private DatePicker dateHiredDatePicker ; @ FXML private ComboBox < PaySchedule > payScheduleComboBox ; @ FXML private ComboBox < PayType > payTypeComboBox ; @ FXML private CheckBox resignedCheckBox ; @ FXML private DatePicker dateResignedDatePicker ; @ FXML private Button deleteButton ; @ FXML private ImageView employeePictureImageView ; @ FXML private Button changePictureButton ; @ FXML private Button removePictureButton ; @ Parameter private Employee employee ; @ Override public void updateDisplay ( ) { } private void displayEmployeePicture ( ) { } private Image getDefaultPicture ( ) { <START_BUG> InputStream in = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "images\\no_picture.jpg" ) ; <END_BUG> try { return new Image ( in ) ; } finally { IOUtils . closeQuietly ( in ) ; } } private String getTitle ( ) { } @ FXML public void doOnBack ( ) { } @ FXML public void saveEmployee ( ) { } private boolean validateFields ( ) { } private boolean isEmployeeNumberNotValid ( ) { } private boolean isPayScheduleNotSpecified ( ) { } private boolean isPayTypeNotSpecified ( ) { } private boolean isNicknameNotSpecified ( ) { } private boolean isFirstNameNotSpecified ( ) { } private boolean isLastNameNotSpecified ( ) { } private boolean isEmployeeNumberAlreadyUsed ( ) { } private boolean isEmployeeNumberNotSpecified ( ) { } @ FXML public void deleteEmployee ( ) { } private boolean employeeHasPayslipRecord ( ) { } @ FXML public void changePicture ( ) { } private EmployeePicture createEmployeePicture ( File file ) { } @ FXML public void removePicture ( ) { } }

Fix:
InputStream in = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "images//no_picture.jpg" ) ;
Buggy code:
public class MessageEndpointInvocationHandler extends AbstractInvocationHandler implements MessageEndpoint { private final MessageEndpointService service ; private final Object delegate ; private final XAResource xaRes ; private final AtomicBoolean released = new AtomicBoolean ( false ) ; private Transaction currentTx ; private ClassLoader previousClassLoader ; private Transaction previousTx ; MessageEndpointInvocationHandler ( final MessageEndpointService service , final Object delegate , final XAResource xaResource ) { } @ Override public void afterDelivery ( ) throws ResourceException { } @ Override public void beforeDelivery ( Method method ) throws NoSuchMethodException , ResourceException { } @ Override protected boolean doEquals ( Object obj ) { } @ Override protected Object doInvoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { } @ Override public int hashCode ( ) { } protected final ClassLoader getApplicationClassLoader ( ) { <START_BUG> return service . getMessageListenerInterface ( ) . getClassLoader ( ) ; <END_BUG> } protected final TransactionManager getTransactionManager ( ) { } @ Override public void release ( ) { } }

Fix:
return this . service . getClassLoader ( ) ;
Buggy code:
public class InsertCommand < T > extends EditCommand < T > { public InsertCommand ( final T object ) { } @ Override public void accept ( final CommandVisitor < T > visitor ) { <START_BUG> visitor . visitInsertCommand ( object ) ; <END_BUG> } }

Fix:
visitor . visitInsertCommand ( InsertCommand . getObject ( ) ) ;
Buggy code:
@ Controller public class ErrorPageController { <START_BUG> @ RequestMapping ( value = "//error" , method = RequestMethod . GET ) <END_BUG> @ ResponseBody public ModelAndView error ( HttpServletRequest request ) { ModelAndView mv = new ModelAndView ( "error_page" ) ; mv . addObject ( "error_name" , "404<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ; return mv ; } }

Fix:
@ RequestMapping ( "//error" )
Buggy code:
public class Vector2 { public static final float TO_RADIANS = ( 1 // 180.0F ) * ( ( float ) ( Math . PI ) ) ; public static final float TO_DEGREES = ( 1 // ( ( float ) ( Math . PI ) ) ) * 180 ; public float x ; public float y ; public Vector2 ( ) { } public Vector2 ( float pX , float pY ) { } public Vector2 ( Vector2 pOther ) { } public Vector2 copy ( ) { } public Vector2 set ( float pX , float pY ) { } public Vector2 set ( Vector2 pOther ) { } public Vector2 add ( float pX , float pY ) { } public Vector2 add ( Vector2 pOther ) { } public Vector2 sub ( float pX , float pY ) { } public Vector2 sub ( Vector2 pOther ) { } public Vector2 mul ( float pScalar ) { } public float len ( ) { } public Vector2 nor ( ) { } public float angle ( ) { } public Vector2 rotate ( float pAngle ) { float rad = pAngle * ( Vector2 . TO_RADIANS ) ; float cos = ( ( float ) ( Math . cos ( rad ) ) ) ; float sin = ( ( float ) ( Math . sin ( rad ) ) ) ; float newX = ( ( this . x ) * cos ) - ( ( this . y ) * sin ) ; <START_BUG> float newY = ( ( this . y ) * sin ) + ( ( this . y ) * cos ) ; <END_BUG> this . x = newX ; this . y = newY ; return this ; } public float dist ( float pX , float pY ) { } public float dist ( Vector2 pOther ) { } public float distSquared ( float pX , float pY ) { } public float distSquared ( Vector2 pOther ) { } }

Fix:
float newY = ( ( this . x ) * sin ) + ( ( this . y ) * cos ) ;
Buggy code:
public class ConnectionFactoryRemove extends AbstractJMSSubsystemUpdate < Void > { private static final long serialVersionUID = - 4308722612702198415L ; private final String cfName ; public ConnectionFactoryRemove ( String cfName ) { } protected void applyUpdate ( JMSSubsystemElement element ) throws UpdateFailedException { } protected < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > handler , P param ) { <START_BUG> final ServiceController < ? > service = context . getServiceContainer ( ) . getService ( JMS_CF_BASE . append ( cfName ) ) ; <END_BUG> if ( service == null ) { handler . handleSuccess ( null , param ) ; } else { service . addListener ( new UpdateResultHandler . ServiceRemoveListener < P > ( handler , param ) ) ; } } public AbstractSubsystemUpdate < JMSSubsystemElement , ? > getCompensatingUpdate ( JMSSubsystemElement original ) { } }

Fix:
final ServiceController < ? > service = context . getServiceRegistry ( ) . getService ( JMS_CF_BASE . append ( cfName ) ) ;
Buggy code:
public class KohaRemoteServiceManager extends KohaConnector implements RemoteServiceManager { static Logger log = Logger . getLogger ( KohaLookupItemService . class ) ; private static final long serialVersionUID = 7115174311329481562L ; private KohaConfiguration kohaConfig = null ; public KohaRemoteServiceManager ( ) throws ParserConfigurationException , ServiceException , SAXException { } public KohaRemoteServiceManager ( Properties properties ) throws ParserConfigurationException , ServiceException , SAXException { } public String getCurrencyCode ( ) { <START_BUG> return kohaConfig . getProperty ( CONFIG_KOHA_CURRENCY_CODE ) ; <END_BUG> } }

Fix:
return kohaConfig . getProperty ( CONF_KOHA_CURRENCY_CODE ) ;
Buggy code:
public class Timestamps { public static int findNearestSuccessorForTimestamp ( Set < Timestamp > timestamps , Timestamp sought ) { int start = 0 ; int end = ( timestamps . size ( ) ) - 1 ; while ( start <= end ) { int mid = ( start + end ) // 2 ; Timestamp stored = Iterables . get ( timestamps , mid ) ; if ( ( sought . getMicros ( ) ) == ( stored . getMicros ( ) ) ) { return mid ; } else <START_BUG> if ( ( sought . getMicros ( ) ) < ( stored . getMicros ( ) ) ) { <END_BUG> start = mid + 1 ; } else { end = mid - 1 ; } } return start ; } public static int findNearestSuccessorForTimestamp ( Set < Long > timestamps , long sought ) { } }

Fix:
if ( ( sought . getMicros ( ) ) > ( stored . getMicros ( ) ) ) {
Buggy code:
class NewConnectionFactoryAdd implements ModelAddOperationHandler , RuntimeOperationHandler { static final NewConnectionFactoryAdd INSTANCE = new NewConnectionFactoryAdd ( ) ; private static final String [ ] NO_BINDINGS = new String [ 0 ] ; public Cancellable execute ( final NewOperationContext context , final ModelNode operation , final ResultHandler resultHandler ) { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; final ModelNode compensatingOperation = new ModelNode ( ) ; compensatingOperation . get ( OP ) . set ( REMOVE ) ; compensatingOperation . get ( OP_ADDR ) . set ( operation . require ( OP_ADDR ) ) ; if ( context instanceof NewRuntimeOperationContext ) { final NewRuntimeOperationContext runtimeContext = ( ( NewRuntimeOperationContext ) ( context ) ) ; final ConnectionFactoryConfiguration configuration = NewConnectionFactoryAdd . createConfiguration ( name , operation ) ; final ConnectionFactoryService service = new ConnectionFactoryService ( configuration ) ; final ServiceName serviceName = JMS_CF_BASE . append ( name ) ; runtimeContext . getServiceTarget ( ) . addService ( serviceName , service ) . addDependency ( JMS_MANAGER , JMSServerManager . class , service . getJmsServer ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; } final ModelNode subModel = context . getSubModel ( ) ; for ( final String attribute : JMSServices . CF_ATTRIBUTES ) { <START_BUG> if ( operation . has ( attribute ) ) { <END_BUG> subModel . get ( attribute ) . set ( operation . get ( attribute ) ) ; } } resultHandler . handleResultComplete ( compensatingOperation ) ; return Cancellable . NULL ; } static ConnectionFactoryConfiguration createConfiguration ( final String name , final ModelNode operation ) { } static String [ ] jndiBindings ( final ModelNode node ) { } }

Fix:
if ( operation . get ( attribute ) . isDefined ( ) ) {
Buggy code:
public class SubscriptionFilter implements SharedPreferences . OnSharedPreferenceChangeListener , IPlaylistFilter { public enum MODE { SHOW_ALL , SHOW_NONE , SHOW_SELECTED ; } public static final boolean SHOW_LISTENED_DEFAULT = true ; private final String SELECTED_SUBSCRIPTIONS_KEY ; private final String showListenedKey = ApplicationConfiguration . showListenedKey ; private static final String SEPARATOR = "," ; private Long mFilterType = SubscriptionFilter . DisplayFilter . MANUAL ; private boolean mShowListened = SubscriptionFilter . SHOW_LISTENED_DEFAULT ; private final HashSet < Long > mSubscriptions = new HashSet < > ( ) ; private ReentrantLock mLock = new ReentrantLock ( ) ; public SubscriptionFilter ( @ NonNull Context argContext ) { } public void add ( Long argID ) { } public boolean remove ( Long argID ) { } public boolean isShown ( Long argID ) { } public SubscriptionFilter . MODE getMode ( ) { } public void setMode ( SubscriptionFilter . MODE argMode , Context argContext ) { } public String toSQL ( ) { } public void clear ( ) { } @ Override public void onSharedPreferenceChanged ( SharedPreferences sharedPreferences , String key ) { if ( key == ( SELECTED_SUBSCRIPTIONS_KEY ) ) { try { mLock . lock ( ) ; String prefrenceValue = sharedPreferences . getString ( key , "" ) ; mSubscriptions . clear ( ) ; if ( TextUtils . isEmpty ( prefrenceValue ) ) { clear ( ) ; return ; } if ( prefrenceValue . contains ( SubscriptionFilter . SEPARATOR ) ) { for ( Long subscriptionId : parsePreference ( prefrenceValue ) ) { mSubscriptions . add ( subscriptionId ) ; <START_BUG> mFilterType = SubscriptionFilter . DisplayFilter . MANUAL ; <END_BUG> } return ; } Long longValue = Long . valueOf ( prefrenceValue ) ; if ( longValue > 0 ) { mSubscriptions . add ( longValue ) ; mFilterType = SubscriptionFilter . DisplayFilter . MANUAL ; return ; } mFilterType = longValue ; } finally { mLock . unlock ( ) ; } } else if ( key == ( ApplicationConfiguration . showListenedKey ) ) { mShowListened = sharedPreferences . getBoolean ( showListenedKey , mShowListened ) ; } } private HashSet < Long > parsePreference ( @ Nullable String argPrefValue ) { } private String toPreferenceValue ( @ NonNull HashSet < Long > argLongs ) { } private static class DisplayFilter { public static final long MANUAL = 0 ; public static final long ALL = - 1 ; public static final long SELECTED = - 2 ; } }

Fix:
mFilterType = SubscriptionFilter . DisplayFilter . SELECTED ;
Buggy code:
public class MAlice { public static void main ( String [ ] args ) { String maliceFileName = "" ; System . out . println ( "Parsing<seq2seq4repair_space>Alice<seq2seq4repair_space>file" ) ; <START_BUG> MAliceLexer lexer = new MAliceLexer ( new ANTLRStringStream ( "b<seq2seq4repair_space>was<seq2seq4repair_space>a<seq2seq4repair_space>number<seq2seq4repair_space>and<seq2seq4repair_space>-~-(-<seq2seq4repair_space>b<seq2seq4repair_space>*<seq2seq4repair_space>3<seq2seq4repair_space>+<seq2seq4repair_space>4<seq2seq4repair_space>*<seq2seq4repair_space>ack(m+2,n)<seq2seq4repair_space>-<seq2seq4repair_space>2<seq2seq4repair_space>//<seq2seq4repair_space>3)<seq2seq4repair_space>&<seq2seq4repair_space>3<seq2seq4repair_space>|<seq2seq4repair_space>2+2*~~-(3//arr's<seq2seq4repair_space>2<seq2seq4repair_space>piece)<seq2seq4repair_space>spoke." ) ) ; <END_BUG> CommonTokenStream tokenStream = new CommonTokenStream ( lexer ) ; ParseTreeBuilder builder = new ParseTreeBuilder ( "prog" ) ; MAliceParser maliceParser = new MAliceParser ( tokenStream , builder ) ; try { maliceParser . program ( ) ; } catch ( RecognitionException ex ) { MAlice . die ( "Parser" , ex ) ; } Parser parser = new Parser ( ) ; try { parser . parseProgram ( builder . getTree ( ) ) ; } catch ( RuntimeException ex ) { MAlice . die ( "Build" , ex ) ; } System . out . println ( "Generating<seq2seq4repair_space>assembly<seq2seq4repair_space>code" ) ; CodeGenerator codeGenerator = new CodeGenerator ( parser . getCommands ( ) , parser . getSymbolTable ( ) ) ; List < String > assembly = codeGenerator . generateCode ( ) ; for ( String asm : assembly ) { System . out . println ( asm ) ; } } private static void writeAssembly ( String assemblyFileName , List < String > assembly ) throws IOException { } private static void buildAssembly ( String assemblyFileName , String baseFileName ) throws Exception { } private static void die ( String message ) { } private static void die ( String failedTarget , Exception ex ) { } No newline ; at end ; of file ; }

Fix:
MAliceLexer lexer = new MAliceLexer ( new ANTLRStringStream ( "b<seq2seq4repair_space>was<seq2seq4repair_space>a<seq2seq4repair_space>number<seq2seq4repair_space>and<seq2seq4repair_space>-~-(-<seq2seq4repair_space>b<seq2seq4repair_space>*<seq2seq4repair_space>3<seq2seq4repair_space>+<seq2seq4repair_space>(0<seq2seq4repair_space>-<seq2seq4repair_space>-2)<seq2seq4repair_space>+<seq2seq4repair_space>4<seq2seq4repair_space>*<seq2seq4repair_space>ack(m+2,n)<seq2seq4repair_space>-<seq2seq4repair_space>2<seq2seq4repair_space>//<seq2seq4repair_space>3)<seq2seq4repair_space>&<seq2seq4repair_space>3<seq2seq4repair_space>|<seq2seq4repair_space>2+2*~~-(3//arr's<seq2seq4repair_space>2<seq2seq4repair_space>piece)<seq2seq4repair_space>spoke." ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient @ Ignore ( "AS7-3837" ) public class WebSecurityCERTTestCase { protected final String URL = ( "https:////localhost:8380//" + ( getContextPath ( ) ) ) + "//secured//" ; @ Deployment public static WebArchive deployment ( ) { } @ AfterClass public static void after ( ) throws Exception { } @ Test public void testClientCertSuccessfulAuth ( ) throws Exception { } @ Test public void testClientCertUnsuccessfulAuth ( ) throws Exception { } protected void makeCall ( String alias , int expectedStatusCode ) throws Exception { } public static void createTestConnector ( final ModelControllerClient client ) throws Exception { final List < ModelNode > updates = new ArrayList < ModelNode > ( ) ; ModelNode op = new ModelNode ( ) ; op . get ( OP ) . set ( ADD ) ; op . get ( OP_ADDR ) . add ( "socket-binding-group" , "standard-sockets" ) ; op . get ( OP_ADDR ) . add ( "socket-binding" , "https-test" ) ; op . get ( "interface" ) . set ( "default" ) ; op . get ( "port" ) . set ( 8380 ) ; updates . add ( op ) ; final ModelNode composite = Util . getEmptyOperation ( COMPOSITE , new ModelNode ( ) ) ; final ModelNode steps = composite . get ( STEPS ) ; op = new ModelNode ( ) ; op . get ( OP ) . set ( ADD ) ; op . get ( OP_ADDR ) . add ( SUBSYSTEM , "web" ) ; op . get ( OP_ADDR ) . add ( "connector" , "testConnector" ) ; op . get ( "socket-binding" ) . set ( "https-test" ) ; op . get ( "enabled" ) . set ( true ) ; op . get ( "protocol" ) . set ( "HTTP//1.1" ) ; op . get ( "scheme" ) . set ( "https" ) ; op . get ( "secure" ) . set ( true ) ; steps . add ( op ) ; <START_BUG> ModelNode ssl = createOpNode ( "subsystem=web//connector=testConnector//configuration=ssl" , "add" ) ; <END_BUG> ssl . get ( "name" ) . set ( "https-test" ) ; ssl . get ( "key-alias" ) . set ( "test" ) ; ssl . get ( "password" ) . set ( "changeit" ) ; ClassLoader tccl = Thread . currentThread ( ) . getContextClassLoader ( ) ; java . net . URL keystore = tccl . getResource ( "security//server.keystore" ) ; ssl . get ( "certificate-key-file" ) . set ( keystore . getPath ( ) ) ; ssl . get ( "protocol" ) . set ( "TLS" ) ; ssl . get ( "verify-client" ) . set ( true ) ; steps . add ( ssl ) ; updates . add ( composite ) ; WebSecurityCERTTestCase . applyUpdates ( updates , client ) ; } public static void createSecurityDomains ( final ModelControllerClient client ) throws Exception { } public static void removeTestConnector ( final ModelControllerClient client ) throws Exception { } public static void removeSecurityDomains ( final ModelControllerClient client ) throws Exception { } public static void applyUpdates ( final List < ModelNode > updates , final ModelControllerClient client ) throws Exception { } public static void applyUpdate ( ModelNode update , final ModelControllerClient client ) throws Exception { } public String getContextPath ( ) { } public static HttpClient wrapClient ( HttpClient base , String alias ) { } }

Fix:
ModelNode ssl = createOpNode ( "subsystem=web//connector=testConnector//ssl=configuration" , "add" ) ;
Buggy code:
public class QueuelessThreadPoolService implements Service < ManagedQueuelessExecutorService > { private final InjectedValue < ThreadFactory > threadFactoryValue = new InjectedValue < ThreadFactory > ( ) ; private final InjectedValue < Executor > handoffExecutorValue = new InjectedValue < Executor > ( ) ; private ManagedQueuelessExecutorService executor ; private int maxThreads ; private boolean blocking ; private TimeSpec keepAlive ; public QueuelessThreadPoolService ( int maxThreads , boolean blocking , TimeSpec keepAlive ) { } public synchronized void start ( final StartContext context ) throws StartException { } public synchronized void stop ( final StopContext context ) { } public synchronized ManagedQueuelessExecutorService getValue ( ) throws IllegalStateException { final ManagedQueuelessExecutorService value = this . executor ; if ( value == null ) { <START_BUG> throw MESSAGES . queuelessThreadPoolExecutorUninitialized ( ) ; <END_BUG> } return value ; } public Injector < ThreadFactory > getThreadFactoryInjector ( ) { } public Injector < Executor > getHandoffExecutorInjector ( ) { } public synchronized void setMaxThreads ( int maxThreads ) { } public synchronized void setKeepAlive ( TimeSpec keepAliveSpec ) { } public int getCurrentThreadCount ( ) { } public int getLargestThreadCount ( ) { } public int getRejectedCount ( ) { } public int getQueueSize ( ) { } TimeUnit getKeepAliveUnit ( ) { } }

Fix:
throw ROOT_LOGGER . queuelessThreadPoolExecutorUninitialized ( ) ;
Buggy code:
public class X931Signer implements Signer { public static final int TRAILER_IMPLICIT = 188 ; public static final int TRAILER_RIPEMD160 = 12748 ; public static final int TRAILER_RIPEMD128 = 13004 ; public static final int TRAILER_SHA1 = 13260 ; public static final int TRAILER_SHA256 = 13516 ; public static final int TRAILER_SHA512 = 13772 ; public static final int TRAILER_SHA384 = 14028 ; public static final int TRAILER_WHIRLPOOL = 14284 ; public static final int TRAILER_SHA224 = 14540 ; private static Hashtable trailerMap = new Hashtable ( ) ; private Digest digest ; private AsymmetricBlockCipher cipher ; private RSAKeyParameters kParam ; private int trailer ; private int keyBits ; private byte [ ] block ; public X931Signer ( AsymmetricBlockCipher cipher , Digest digest , boolean implicit ) { } public X931Signer ( AsymmetricBlockCipher cipher , Digest digest ) { } public void init ( boolean forSigning , CipherParameters param ) { } private void clearBlock ( byte [ ] block ) { } public void update ( byte b ) { } public void update ( byte [ ] in , int off , int len ) { } public void reset ( ) { } public byte [ ] generateSignature ( ) throws CryptoException { } private void createSignatureBlock ( ) { int digSize = digest . getDigestSize ( ) ; int delta ; if ( ( trailer ) == ( X931Signer . TRAILER_IMPLICIT ) ) { delta = ( ( block . length ) - digSize ) - 1 ; digest . doFinal ( block , delta ) ; block [ ( ( block . length ) - 1 ) ] = ( ( byte ) ( X931Signer . TRAILER_IMPLICIT ) ) ; } else { delta = ( ( block . length ) - digSize ) - 2 ; digest . doFinal ( block , delta ) ; block [ ( ( block . length ) - 2 ) ] = ( ( byte ) ( ( trailer ) > > > 8 ) ) ; block [ ( ( block . length ) - 1 ) ] = ( ( byte ) ( trailer ) ) ; } <START_BUG> block [ 0 ] = 6 ; <END_BUG> for ( int i = delta - 2 ; i != 0 ; i -- ) { block [ i ] = ( ( byte ) ( 187 ) ) ; } block [ ( delta - 1 ) ] = ( ( byte ) ( 186 ) ) ; } public boolean verifySignature ( byte [ ] signature ) { } }

Fix:
block [ 0 ] = 107 ;
Buggy code:
abstract class Lexer { private static final char DISABLED = '￾' ; private final char delimiter ; private final char escape ; private final char encapsulator ; private final char commmentStart ; final boolean ignoreSurroundingSpaces ; final boolean ignoreEmptyLines ; final CSVFormat format ; final ExtendedBufferedReader in ; Lexer ( final CSVFormat format , final ExtendedBufferedReader in ) { } private final char mapNullToDisabled ( Character c ) { } <START_BUG> int getLineNumber ( ) { <END_BUG> return in . getLineNumber ( ) ; } int readEscape ( ) throws IOException { } void trimTrailingSpaces ( final StringBuilder buffer ) { } boolean isWhitespace ( final int c ) { } boolean isEndOfLine ( int c ) throws IOException { } boolean isStartOfLine ( final int c ) { } boolean isEndOfFile ( final int c ) { } abstract Token nextToken ( Token reusableToken ) throws IOException { } boolean isDelimiter ( final int c ) { } boolean isEscape ( final int c ) { } boolean isEncapsulator ( final int c ) { } boolean isCommentStart ( final int c ) { } }

Fix:
long getLineNumber ( ) {
Buggy code:
public class MarkLogicInstall extends XQDTInterpreterInstall implements ISemanticValidatingInterpreterInstall { public MarkLogicInstall ( IInterpreterInstallType type , String id ) { } @ Override public IInterpreterRunner getInterpreterRunner ( String mode ) { <START_BUG> final IInterpreterRunner runner = super . getInterpreterRunner ( mode ) ; <END_BUG> if ( runner != null ) { return runner ; } if ( mode . equals ( RUN_MODE ) ) { return new MarkLogicRunner ( this ) ; } return null ; } public ISemanticValidator getSemanticValidator ( ) { } }

Fix:
IInterpreterRunner runner = super . getInterpreterRunner ( mode ) ;
Buggy code:
public class BinaryMemtable implements IFlushable { private static final Logger logger = LoggerFactory . getLogger ( BinaryMemtable . class ) ; private final int threshold = ( ( DatabaseDescriptor . getBMTThreshold ( ) ) * 1024 ) * 1024 ; private final AtomicInteger currentSize = new AtomicInteger ( 0 ) ; private boolean isFrozen = false ; private final Map < DecoratedKey , byte [ ] > columnFamilies = new org . cliffc . high_scale_lib . NonBlockingHashMap < DecoratedKey , byte [ ] > ( ) ; private final Lock lock = new ReentrantLock ( ) ; Condition condition ; private final IPartitioner partitioner = StorageService . getPartitioner ( ) ; private final ColumnFamilyStore cfs ; public BinaryMemtable ( ColumnFamilyStore cfs ) { } boolean isThresholdViolated ( ) { } void put ( DecoratedKey key , byte [ ] buffer ) { } public boolean isClean ( ) { } private void resolve ( DecoratedKey key , byte [ ] buffer ) { } private List < DecoratedKey > getSortedKeys ( ) { } private SSTableReader writeSortedContents ( List < DecoratedKey > sortedKeys ) throws IOException { BinaryMemtable . logger . info ( ( "Writing<seq2seq4repair_space>" + ( this ) ) ) ; String path = cfs . getFlushPath ( ) ; <START_BUG> SSTableWriter writer = new SSTableWriter ( path , sortedKeys . size ( ) , cfs . metadata , cfs . partitioner_ ) ; <END_BUG> for ( DecoratedKey key : sortedKeys ) { byte [ ] bytes = columnFamilies . get ( key ) ; assert ( bytes . length ) > 0 ; writer . append ( key , bytes ) ; } SSTableReader sstable = writer . closeAndOpenReader ( ) ; BinaryMemtable . logger . info ( ( "Completed<seq2seq4repair_space>flushing<seq2seq4repair_space>" + ( writer . getFilename ( ) ) ) ) ; return sstable ; } public void flushAndSignal ( final CountDownLatch latch , ExecutorService sorter , final ExecutorService writer ) { } }

Fix:
SSTableWriter writer = new SSTableWriter ( path , sortedKeys . size ( ) , cfs . metadata , cfs . partitioner ) ;