nus-yam/ex-repair huggingface dataset:
Buggy code:
public class RemoveCondacts { public static Program program ( Program program ) { } private final Program program ; private final Map < String , Node > nodeTable ; private final List < Node > resultNodes = new ArrayList < > ( ) ; private final TypeReconstructor typeReconstructor ; private RemoveCondacts ( Program program ) { } private void remove ( ) { } private Program removeTrivialCondacts ( ) { } private boolean isLiteralTrue ( Expr e ) { } private Node removeCondacts ( Node node ) { } private Node createCondactNode ( String id ) { } private Node addClock ( Node node , IdExpr clock ) { } private Node clockOutputs ( Node node , IdExpr clock ) { } private Node clockArrowsAndPres ( Node node , final IdExpr clock ) { final VarDecl init = new VarDecl ( "~init" , NamedType . BOOL ) ; final List < Equation > preEquations = new ArrayList < > ( ) ; final List < VarDecl > preLocals = new ArrayList < > ( ) ; node = ( ( Node ) ( node . accept ( new AstMapVisitor ( ) { private int counter = 0 ; @ Override public Expr visit ( BinaryExpr e ) { if ( ( e . op ) == ( BinaryOp . ARROW ) ) { return new jkind . lustre . IfThenElseExpr ( new IdExpr ( init . id ) , e . left . accept ( this ) , e . right . accept ( this ) ) ; } else { return super . visit ( e ) ; } } @ Override public Expr visit ( UnaryExpr e ) { if ( ( e . op ) == ( UnaryOp . PRE ) ) { String state = "~state" + ( ( counter ) ++ ) ; Type type = e . expr . accept ( typeReconstructor ) ; preLocals . add ( new VarDecl ( state , type ) ) ; <START_BUG> preEquations . add ( new Equation ( new IdExpr ( state ) , new jkind . lustre . IfThenElseExpr ( clock , e . expr , new UnaryExpr ( UnaryOp . PRE , new IdExpr ( state ) ) ) ) ) ; <END_BUG> return new UnaryExpr ( UnaryOp . PRE , new IdExpr ( state ) ) ; } else { return super . visit ( e ) ; } } } ) ) ) ; NodeBuilder builder = new NodeBuilder ( node ) ; builder . addLocals ( preLocals ) ; builder . addLocal ( init ) ; builder . addEquations ( preEquations ) ; builder . addEquation ( new Equation ( new IdExpr ( init . id ) , new BinaryExpr ( new BoolExpr ( true ) , BinaryOp . ARROW , new jkind . lustre . IfThenElseExpr ( new UnaryExpr ( UnaryOp . PRE , clock ) , new BoolExpr ( false ) , new UnaryExpr ( UnaryOp . PRE , new IdExpr ( init . id ) ) ) ) ) ) ; return builder . build ( ) ; } private Node clockNodeCalls ( Node node , final IdExpr clock ) { } private Node createClockedNode ( String id ) { } private Node clockProperties ( Node node , final IdExpr clock ) { } private Node renameNode ( Node node , String id ) { } private Program getResult ( ) { } }

Fix:
preEquations . add ( new Equation ( new IdExpr ( state ) , new jkind . lustre . IfThenElseExpr ( clock , e . expr . accept ( this ) , new UnaryExpr ( UnaryOp . PRE , new IdExpr ( state ) ) ) ) ) ;
Buggy code:
class Compiling implements IntentProcessPhase { private static final Logger log = LoggerFactory . getLogger ( Compiling . class ) ; private final IntentProcessor processor ; private final IntentData data ; private final Optional < IntentData > stored ; Compiling ( IntentProcessor processor , IntentData data , Optional < IntentData > stored ) { } @ Override public Optional < IntentProcessPhase > execute ( ) { try { List < Intent > compiled = processor . compile ( data . intent ( ) , stored . map ( IntentData :: installables ) . orElse ( null ) ) ; return Optional . of ( new Installing ( processor , new IntentData ( data , compiled ) , stored ) ) ; } catch ( IntentException e ) { Compiling . log . debug ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>compile<seq2seq4repair_space>intent<seq2seq4repair_space>{}<seq2seq4repair_space>due<seq2seq4repair_space>to:<seq2seq4repair_space>{}" , data . intent ( ) , e ) ; <START_BUG> if ( stored . filter ( ( x ) -> x . installables ( ) . isEmpty ( ) ) . isPresent ( ) ) { <END_BUG> return Optional . of ( new Withdrawing ( processor , new IntentData ( data , stored . get ( ) . installables ( ) ) ) ) ; } else { return Optional . of ( new Failed ( data ) ) ; } } } }

Fix:
if ( stored . filter ( ( x ) -> ! ( x . installables ( ) . isEmpty ( ) ) ) . isPresent ( ) ) {
Buggy code:
@ WebServlet ( name = "ChargeServlet" , urlPatterns = { "//cpanel//ChargeServlet" } ) public class ChargeServlet extends HttpServlet { @ Inject private PartnerResource pr ; @ Inject private TransactionResource tr ; @ Inject private DetailAccountResource dar ; private static final long serialVersionUID = 1L ; protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String creditCardNumber = request . getParameter ( "creditcard" ) ; if ( ( creditCardNumber != null ) && ( ( request . getParameter ( "amount" ) ) != null ) ) { try { Double d = ( Double . parseDouble ( request . getParameter ( "amount" ) ) ) * 100 ; long amount = d . longValue ( ) ; DetailAccount da = ( ( DetailAccount ) ( request . getSession ( ) . getAttribute ( "user" ) ) ) ; Date now = new Date ( ) ; <START_BUG> ClientRequest clientRequest = new ClientRequest ( ( ( ( "http:////localhost:8080//fastcheck//rest//transactions//charge//" + ( da . getUserName ( ) ) ) + "//" ) + creditCardNumber ) ) ; <END_BUG> clientRequest . accept ( "application//json" ) ; clientRequest . body ( "application//json" , new at . ac . uibk . paybar . messages . TransactionRequest ( amount , BankPosName . toString ( ) ) ) ; ClientResponse < String > fastcheckResponse = clientRequest . post ( String . class ) ; if ( ( fastcheckResponse . getStatus ( ) ) == 200 ) { request . setAttribute ( "message" , "The<seq2seq4repair_space>Ammount<seq2seq4repair_space>has<seq2seq4repair_space>ben<seq2seq4repair_space>charged<seq2seq4repair_space>to<seq2seq4repair_space>your<seq2seq4repair_space>Account" ) ; } else { request . setAttribute ( "message" , "The<seq2seq4repair_space>charge<seq2seq4repair_space>request<seq2seq4repair_space>has<seq2seq4repair_space>failed!" ) ; } RequestDispatcher dispatcher = request . getRequestDispatcher ( "charge.jsp" ) ; dispatcher . forward ( request , response ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; if ( ( ( e . getCause ( ) ) != null ) && ( e . getCause ( ) . getClass ( ) . equals ( PaybarResourceException . class ) ) ) { request . setAttribute ( "error" , e . getCause ( ) . getMessage ( ) ) ; } else { if ( ( ( e . getCause ( ) ) != null ) && ( e . getCause ( ) . getClass ( ) . equals ( PaybarResourceException . class ) ) ) { request . setAttribute ( "error" , e . getCause ( ) . getMessage ( ) ) ; } else { request . setAttribute ( "error" , ( "Service<seq2seq4repair_space>temporary<seq2seq4repair_space>not<seq2seq4repair_space>available!<seq2seq4repair_space>Maybe<seq2seq4repair_space>db<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>running!" + ( e . getMessage ( ) ) ) ) ; } } RequestDispatcher dispatcher = request . getRequestDispatcher ( "charge.jsp" ) ; dispatcher . forward ( request , response ) ; } } } }

Fix:
ClientRequest clientRequest = new ClientRequest ( ( ( ( "http:////localhost:8080//fastcheck//rest//transactions//charge//" + ( da . getId ( ) ) ) + "//" ) + creditCardNumber ) ) ;
Buggy code:
public class FastDateFormatTest { @ Test public void test_getInstance ( ) { } @ Test public void test_getInstance_String ( ) { } @ Test public void test_getInstance_String_TimeZone ( ) { } @ Test public void test_getInstance_String_Locale ( ) { } @ Test public void test_changeDefault_Locale_DateInstance ( ) { } @ Test public void test_changeDefault_Locale_DateTimeInstance ( ) { } @ Test public void test_getInstance_String_TimeZone_Locale ( ) { } @ Test public void testCheckDefaults ( ) { } @ Test public void testCheckDifferingStyles ( ) { } @ Test public void testDateDefaults ( ) { } @ Test public void testTimeDefaults ( ) { } @ Test public void testTimeDateDefaults ( ) { } @ Test public void testParseSync ( ) throws InterruptedException { final String pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS<seq2seq4repair_space>Z" ; final FastDateFormat formatter = FastDateFormat . getInstance ( pattern ) ; long sdfTime = measureTime ( formatter , new SimpleDateFormat ( pattern ) { private static final long serialVersionUID = 1L ; @ Override <START_BUG> public Object parseObject ( String formattedDate ) throws ParseException { <END_BUG> synchronized ( this ) { return super . parse ( formattedDate ) ; } } } ) ; long fdfTime = measureTime ( formatter , FastDateFormat . getInstance ( pattern ) ) ; String times = ( ( ">>FastDateFormatTest:<seq2seq4repair_space>FastDateParser:" + fdfTime ) + "<seq2seq4repair_space>SimpleDateFormat:" ) + sdfTime ; System . out . println ( times ) ; } private static final int NTHREADS = 10 ; private static final int NROUNDS = 10000 ; private long measureTime ( final Format formatter , final Format parser ) throws InterruptedException { } }

Fix:
public Object parseObject ( final String formattedDate ) throws ParseException {
Buggy code:
public class OutDegreeDistribution { private static String argPathToArc = "" ; private static String argPathOut = "" ; public static void main ( String [ ] args ) throws Exception { } public static class EdgeReader implements FlatMapFunction < String , Tuple2 < Long , Long > > { private static final Pattern SEPARATOR = Pattern . compile ( "[<seq2seq4repair_space>\t,]" ) ; @ Override public void flatMap ( String s , Collector < Tuple2 < Long , Long > > collector ) throws Exception { } } public static class CountVertices implements GroupReduceFunction < Tuple1 < Long > , Long > { @ Override public void reduce ( Iterable < Tuple1 < Long > > vertices , Collector < Long > collector ) throws Exception { } } public static class DegreeOfVertex implements GroupReduceFunction < Tuple1 < Long > , Tuple2 < Long , Long > > { @ Override public void reduce ( Iterable < Tuple1 < Long > > tuples , Collector < Tuple2 < Long , Long > > collector ) throws Exception { } } public static class DistributionElement extends RichGroupReduceFunction < Tuple2 < Long , Long > , Tuple2 < Long , Double > > { private long numVertices ; @ Override public void open ( Configuration parameters ) throws Exception { } @ Override public void reduce ( Iterable < Tuple2 < Long , Long > > verticesWithDegree , Collector < Tuple2 < Long , Double > > collector ) throws Exception { } } public static boolean parseParameters ( String [ ] args ) { <START_BUG> if ( ( ( args . length ) < 3 ) || ( ( args . length ) > 3 ) ) { <END_BUG> System . err . println ( "Usage:<seq2seq4repair_space>[path<seq2seq4repair_space>to<seq2seq4repair_space>arc<seq2seq4repair_space>file]<seq2seq4repair_space>[output<seq2seq4repair_space>path]" ) ; return false ; } OutDegreeDistribution . argPathToArc = args [ 0 ] ; OutDegreeDistribution . argPathOut = args [ 1 ] ; return true ; } }

Fix:
if ( ( ( args . length ) < 2 ) || ( ( args . length ) > 2 ) ) {
Buggy code:
public class TouchVerbHandler implements IVerbHandler { private static class ReadContext { protected DataInputBuffer bufIn_ = new DataInputBuffer ( ) ; } private static Logger logger_ = Logger . getLogger ( ReadVerbHandler . class ) ; private static ThreadLocal < TouchVerbHandler . ReadContext > tls_ = new InheritableThreadLocal < TouchVerbHandler . ReadContext > ( ) ; public void doVerb ( Message message ) { <START_BUG> byte [ ] body = ( ( byte [ ] ) ( message . getMessageBody ( ) [ 0 ] ) ) ; <END_BUG> TouchVerbHandler . ReadContext readCtx = TouchVerbHandler . tls_ . get ( ) ; if ( readCtx == null ) { readCtx = new TouchVerbHandler . ReadContext ( ) ; TouchVerbHandler . tls_ . set ( readCtx ) ; } readCtx . bufIn_ . reset ( body , body . length ) ; try { TouchMessage touchMessage = TouchMessage . serializer ( ) . deserialize ( readCtx . bufIn_ ) ; Table table = Table . open ( touchMessage . table ( ) ) ; table . touch ( touchMessage . key ( ) , touchMessage . isData ( ) ) ; } catch ( IOException ex ) { TouchVerbHandler . logger_ . info ( LogUtil . throwableToString ( ex ) ) ; } } public static void main ( String [ ] args ) { } }

Fix:
byte [ ] body = message . getMessageBody ( ) ;
Buggy code:
public class RelayResourceDefinition extends SimpleResourceDefinition { static final PathElement PATH = PathElement . pathElement ( RELAY , RELAY_NAME ) ; private static final ResourceDescriptionResolver RESOLVER = JGroupsExtension . getResourceDescriptionResolver ( RELAY ) ; static final SimpleAttributeDefinition SITE = new org . jboss . as . controller . SimpleAttributeDefinitionBuilder ( ModelKeys . SITE , ModelType . STRING , false ) . setXmlName ( Attribute . SITE . getLocalName ( ) ) . setAllowExpression ( true ) . setFlags ( RESTART_RESOURCE_SERVICES ) . build ( ) ; static final SimpleAttributeDefinition REMOTE_SITE = new SimpleAttributeDefinition ( ModelKeys . REMOTE_SITE , ModelType . PROPERTY , true ) ; static final SimpleListAttributeDefinition REMOTE_SITES = new SimpleListAttributeDefinition . Builder ( ModelKeys . REMOTE_SITES , RelayResourceDefinition . REMOTE_SITE ) . setAllowNull ( true ) . build ( ) ; static final SimpleAttributeDefinition PROPERTY = new SimpleAttributeDefinition ( ModelKeys . PROPERTY , ModelType . PROPERTY , true ) ; static final SimpleListAttributeDefinition PROPERTIES = new SimpleListAttributeDefinition . Builder ( ModelKeys . PROPERTIES , RelayResourceDefinition . PROPERTY ) . setAllowNull ( true ) . build ( ) ; static final AttributeDefinition [ ] ATTRIBUTES = new AttributeDefinition [ ] { RelayResourceDefinition . SITE } ; static void buildTransformation ( ModelVersion version , ResourceTransformationDescriptionBuilder parent ) { } RelayResourceDefinition ( ) { } @ Override public void registerAttributes ( ManagementResourceRegistration registration ) { } @ Override public void registerChildren ( ManagementResourceRegistration registration ) { registration . registerSubModel ( new RemoteSiteResourceDefinition ( ) ) ; <START_BUG> registration . registerSubModel ( new PropertyResourceDefinition ( ) ) ; <END_BUG> } }

Fix:
registration . registerSubModel ( INSTANCE ) ;
Buggy code:
public class GUIEngine { public static int screenWidth ; public static int screenHeight ; private static boolean paused ; private static Stack < GUI > Interfaces ; public static void init ( int w , int h ) { } public static void addGUI ( GUI g ) { } public static int size ( ) { } public static void control ( KeyStateManager k ) { } public static void draw ( int sx , int sy , Screen s ) { <START_BUG> for ( int i = 0 ; i < ( GUIEngine . Interfaces . size ( ) ) ; ++ i ) { <END_BUG> GUIEngine . Interfaces . get ( i ) . draw ( sx , sy , s ) ; } } public static void update ( double delta ) { } }

Fix:
for ( int i = 0 ; i < ( GUIEngine . size ( ) ) ; ++ i ) {
Buggy code:
public class JdbcDataDao implements DataDao { private DataSource dataSource ; protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private JdbcTemplate jdbcTemplate ; public void setDataSource ( DataSource dataSource ) { } public List < ProductSerial > getDWProductSerial ( String prodid ) { String sql = "" ; logger . info ( ( "JdbcDataDao<seq2seq4repair_space>inside<seq2seq4repair_space>getDWProductSerial<seq2seq4repair_space>prodid<seq2seq4repair_space>" + prodid ) ) ; <START_BUG> sql = ( ( "SELECT<seq2seq4repair_space>T.ProdSerial_ID,<seq2seq4repair_space>Serialno<seq2seq4repair_space>" + "<seq2seq4repair_space>FROM<seq2seq4repair_space>product_serial<seq2seq4repair_space>T<seq2seq4repair_space>WHERE<seq2seq4repair_space>product_id<seq2seq4repair_space>=" ) + prodid ) + "<seq2seq4repair_space>and<seq2seq4repair_space>t.prodserial_id<seq2seq4repair_space>in<seq2seq4repair_space>(select<seq2seq4repair_space>prodserial_id<seq2seq4repair_space>from<seq2seq4repair_space>vw_ampphase)<seq2seq4repair_space>" ; <END_BUG> List < ProductSerial > prodser = jdbcTemplate . query ( sql , new JdbcDataDao . ProdSerMapper ( ) ) ; return prodser ; } private static class ProdSerMapper implements ParameterizedRowMapper < ProductSerial > { public ProductSerial mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } }

Fix:
sql = ( ( "SELECT<seq2seq4repair_space>distinct<seq2seq4repair_space>T.ProdSerial_ID,<seq2seq4repair_space>Serialno<seq2seq4repair_space>" + "<seq2seq4repair_space>FROM<seq2seq4repair_space>product_serial<seq2seq4repair_space>T<seq2seq4repair_space>WHERE<seq2seq4repair_space>product_id<seq2seq4repair_space>=" ) + prodid ) + "<seq2seq4repair_space>and<seq2seq4repair_space>t.prodserial_id<seq2seq4repair_space>in<seq2seq4repair_space>(select<seq2seq4repair_space>prodserial_id<seq2seq4repair_space>from<seq2seq4repair_space>vw_ampphase)<seq2seq4repair_space>" ;
Buggy code:
public class MenuScreen implements Screen , MenuInterface { public static String PLAY = "play" ; public static String SETTINGS = "settings" ; public static final float FRUSTUM_WIDTH = 150 ; public static final float FRUSTUM_HEIGHT = 100 ; public int state ; public static final int MAIN_MENU = 0 ; public static final int SETTINGS_MENU = 1 ; private ShveetLife shveetLife ; private Accounts accounts ; private Viewport viewport ; private OrthographicCamera cam ; private MenuWorld menuWorld ; private MenuRenderer menuRenderer ; private Vector3 touchPoint ; private float lastClick ; SpriteBatch batch ; private PopupMenu popupMenu ; private MovementAnimator myAnimator = new MovementAnimator ( 15 , 5 , 2 , Interpolation . LINEAR_INTERPOLATOR ) ; public MenuScreen ( ShveetLife sl ) { } @ Override public void show ( ) { } @ Override public void render ( float delta ) { } private void updateInput ( ) { } private void update ( float delta ) { } private void draw ( ) { gl . glClearColor ( 0 , 0 , 0.196F , 1 ) ; gl . glClear ( GL_COLOR_BUFFER_BIT ) ; batch . setProjectionMatrix ( cam . combined ) ; batch . begin ( ) ; <START_BUG> batch . draw ( menuBackground , 0 , 0 , 160 , 160 ) ; <END_BUG> menuRenderer . draw ( ) ; popupMenu . draw ( batch ) ; batch . end ( ) ; } @ Override public void playGame ( ) { } @ Override public void connect ( ) { } @ Override public void settings ( ) { } @ Override public void resize ( int width , int height ) { } @ Override public void pause ( ) { } @ Override public void resume ( ) { } @ Override public void hide ( ) { } @ Override public void dispose ( ) { } }

Fix:
batch . draw ( menuBackground , 0 , 0 , MenuScreen . FRUSTUM_WIDTH , MenuScreen . FRUSTUM_HEIGHT ) ;
Buggy code:
public class WarDeploymentInitializingProcessor implements DeploymentUnitProcessor { static final String WAR_EXTENSION = ".war" ; public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( deploymentUnit . hasAttachment ( OSGI_MANIFEST ) ) { return ; } VirtualFile virtualFile = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; <START_BUG> if ( virtualFile . getName ( ) . toLowerCase ( ) . endsWith ( WarDeploymentInitializingProcessor . WAR_EXTENSION ) ) { <END_BUG> DeploymentTypeMarker . setType ( WAR , deploymentUnit ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
if ( virtualFile . getLowerCaseName ( ) . endsWith ( WarDeploymentInitializingProcessor . WAR_EXTENSION ) ) {
Buggy code:
public class AddHandler { public static Signal process ( ParsedInput input , Memory memory ) { int numberOfKeywords = input . getParamPairList ( ) . size ( ) ; if ( numberOfKeywords > 3 ) { return new Signal ( Signal . invalidParamsForAddHandler ) ; } try { ArrayList < KeyParamPair > keyParamPairList = input . getParamPairList ( ) ; int numberOfElements = keyParamPairList . size ( ) ; switch ( numberOfElements ) { case 1 : String floatingTaskName = keyParamPairList . get ( 0 ) . getParam ( ) ; Todo floatingTask = new Todo ( floatingTaskName ) ; memory . add ( floatingTask ) ; return new Signal ( String . format ( addSuccessSignalFormat , floatingTask ) ) ; case 2 : String todoName = keyParamPairList . get ( 0 ) . getParam ( ) ; <START_BUG> String secondKeyword = keyParamPairList . get ( 1 ) . getParam ( ) ; <END_BUG> if ( ( ( secondKeyword . equals ( "by" ) ) || ( secondKeyword . equals ( "on" ) ) ) || ( secondKeyword . equals ( "at" ) ) ) { DateTime deadlineTime = DateParser . parseDate ( keyParamPairList . get ( 1 ) . getParam ( ) ) ; Todo deadline = new Todo ( todoName , deadlineTime ) ; memory . add ( deadline ) ; return new Signal ( String . format ( addSuccessSignalFormat , deadline ) ) ; } else if ( secondKeyword . equals ( "from" ) ) { List < DateTime > dateTimeList = DateParser . parseDates ( keyParamPairList . get ( 1 ) . getParam ( ) ) ; DateTime eventStartTime = dateTimeList . get ( 0 ) ; DateTime eventEndTime = dateTimeList . get ( 1 ) ; Todo event = new Todo ( todoName , eventStartTime , eventEndTime ) ; memory . add ( event ) ; return new Signal ( String . format ( addSuccessSignalFormat , event ) ) ; } } } catch ( DateUndefinedException e ) { e . printStackTrace ( ) ; String exceptionMessage = e . getMessage ( ) ; return new Signal ( String . format ( dateUndefinedException , exceptionMessage ) ) ; } return new Signal ( Signal . unknownAddError ) ; } }

Fix:
String secondKeyword = keyParamPairList . get ( 1 ) . getKeyword ( ) ;
Buggy code:
public class ReceiveMessagesAction extends AbstractColumbaAction { public ReceiveMessagesAction ( FrameMediator controller ) { } public void actionPerformed ( ActionEvent evt ) { if ( ( ConnectionStateImpl . getInstance ( ) . isOnline ( ) ) == false ) { ConnectionStateImpl . getInstance ( ) . setOnline ( true ) ; } <START_BUG> mailCheckingManager . check ( ) ; <END_BUG> } }

Fix:
mailCheckingManager . checkAll ( ) ;
Buggy code:
public class ApplyExtensionsHandler implements OperationStepHandler { public static final String OPERATION_NAME = "resolve-subsystems" ; private final Set < String > appliedExtensions = new HashSet < String > ( ) ; private final ExtensionRegistry extensionRegistry ; private final LocalHostControllerInfo localHostInfo ; private final IgnoredDomainResourceRegistry ignoredResourceRegistry ; public static final SimpleOperationDefinition DEFINITION = new SimpleOperationDefinitionBuilder ( ApplyExtensionsHandler . OPERATION_NAME , null ) . setPrivateEntry ( ) . build ( ) ; public ApplyExtensionsHandler ( ExtensionRegistry extensionRegistry , LocalHostControllerInfo localHostInfo , final IgnoredDomainResourceRegistry ignoredResourceRegistry ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } private Resource getResource ( PathAddress resourceAddress , Resource rootResource , OperationContext context ) { } protected void initializeExtension ( String module ) throws OperationFailedException { try { for ( final Extension extension : Module . loadServiceFromCallerModuleLoader ( ModuleIdentifier . fromString ( module ) , Extension . class ) ) { ClassLoader oldTccl = SecurityActions . setThreadContextClassLoader ( extension . getClass ( ) ) ; try { extension . initializeParsers ( extensionRegistry . getExtensionParsingContext ( module , null ) ) ; <START_BUG> extension . initialize ( extensionRegistry . getExtensionContext ( module ) ) ; <END_BUG> } finally { SecurityActions . setThreadContextClassLoader ( oldTccl ) ; } } } catch ( ModuleLoadException e ) { throw MESSAGES . failedToLoadModule ( e , module ) ; } } }

Fix:
extension . initialize ( extensionRegistry . getExtensionContext ( module , false ) ) ;
Buggy code:
public class EjbJarRuntimeResourceTestBase { protected static final String JAR_NAME = "ejb-management.jar" ; private static final AttributeDefinition [ ] POOL_ATTRIBUTES = new AttributeDefinition [ ] { POOL_AVAILABLE_COUNT , POOL_CREATE_COUNT , POOL_CURRENT_SIZE , POOL_NAME , POOL_MAX_SIZE , POOL_REMOVE_COUNT } ; private static final String [ ] TIMER_ATTRIBUTES = new String [ ] { TIME_REMAINING , NEXT_TIMEOUT , CALENDAR_TIMER } ; private static final String [ ] SCHEDULE_ATTRIBUTES = new String [ ] { DAY_OF_MONTH , DAY_OF_WEEK , HOUR , MINUTE , YEAR , TIMEZONE , TimerAttributeDefinition . START , END } ; @ ContainerResource private ManagementClient managementClient ; public static Archive < ? > getEJBJar ( ) { } private final PathAddress baseAddress ; protected EjbJarRuntimeResourceTestBase ( final PathAddress baseAddress ) { } @ Test public void testMDB ( ) throws Exception { } @ Test public void testNoTimerMDB ( ) throws Exception { } @ Test public void testSLSB ( ) throws Exception { } @ Test public void testNoTimerSLSB ( ) throws Exception { } @ Test public void testSingleton ( ) throws Exception { } @ Test public void testNoTimerSingleton ( ) throws Exception { } @ Test public void testSFSB ( ) throws Exception { } private void testComponent ( EJBComponentType type , String name , boolean expectTimer ) throws Exception { } private void validateSecurity ( ModelNode address , ModelNode resourceDescription , ModelNode resource ) { } private void validatePool ( ModelNode address , ModelNode resourceDescription , ModelNode resource ) { for ( AttributeDefinition attr : EjbJarRuntimeResourceTestBase . POOL_ATTRIBUTES ) { final String name = attr . getName ( ) ; final ModelType expectedType = attr . getType ( ) ; assertTrue ( resourceDescription . get ( ATTRIBUTES , name ) . isDefined ( ) ) ; assertEquals ( STRING , resourceDescription . get ( ATTRIBUTES , name , DESCRIPTION ) . getType ( ) ) ; assertEquals ( expectedType , resourceDescription . get ( ATTRIBUTES , name , TYPE ) . asType ( ) ) ; <START_BUG> assertTrue ( resource . get ( name ) . isDefined ( ) ) ; <END_BUG> assertEquals ( expectedType , resource . get ( name ) . getType ( ) ) ; } } private void validateTimer ( ModelNode address , ModelNode resourceDescription , ModelNode resource , boolean expectTimer ) { } private ModelNode executeOperation ( String name , ModelNode address ) throws IOException { } private PathAddress getComponentAddress ( EJBComponentType type , String name ) { } }

Fix:
assertTrue ( ( name + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>defined" ) , resource . get ( name ) . isDefined ( ) ) ;
Buggy code:
public class FacilityStatus { private Facility facility ; private List < FacilitySession > sessions = new ArrayList < FacilitySession > ( ) ; public FacilityStatus ( Facility facility ) { } public Facility getFacility ( ) { } public void addSession ( FacilitySession session ) { } public FacilitySession currentSession ( ) { } public boolean isInUse ( ) { <START_BUG> return ( ( sessions . size ( ) ) > 0 ) && ( ( currentSession ( ) . getLoginTime ( ) ) != 0L ) ; <END_BUG> } public FacilitySession getLoginDetails ( long timestamp ) { } }

Fix:
return ( ( sessions . size ( ) ) > 0 ) && ( ( currentSession ( ) . getLogoutTime ( ) ) == 0L ) ;
Buggy code:
public final class LDADriver extends AbstractJob { private static final String TOPIC_SMOOTHING_OPTION = "topicSmoothing" ; private static final String NUM_WORDS_OPTION = "numWords" ; private static final String NUM_TOPICS_OPTION = "numTopics" ; static final String STATE_IN_KEY = "org.apache.mahout.clustering.lda.stateIn" ; static final String NUM_TOPICS_KEY = "org.apache.mahout.clustering.lda.numTopics" ; static final String NUM_WORDS_KEY = "org.apache.mahout.clustering.lda.numWords" ; static final String TOPIC_SMOOTHING_KEY = "org.apache.mahout.clustering.lda.topicSmoothing" ; static final int LOG_LIKELIHOOD_KEY = - 2 ; static final int TOPIC_SUM_KEY = - 1 ; static final double OVERALL_CONVERGENCE = 1.0E-5 ; private static final Logger log = LoggerFactory . getLogger ( LDADriver . class ) ; private LDADriver ( ) { } public static void main ( String [ ] args ) throws Exception { } static LDAState createState ( Configuration job ) throws IOException { } @ Override public int run ( String [ ] args ) throws Exception { } private void run ( Configuration conf , Path input , Path output , int numTopics , int numWords , double topicSmoothing , int maxIterations ) throws IOException , ClassNotFoundException , InterruptedException { Path stateIn = new Path ( output , "state-0" ) ; LDADriver . writeInitialState ( stateIn , numTopics , numWords ) ; double oldLL = Double . NEGATIVE_INFINITY ; boolean converged = false ; for ( int iteration = 1 ; ( ( maxIterations < 1 ) || ( iteration <= maxIterations ) ) && ( ! converged ) ; iteration ++ ) { <START_BUG> LDADriver . log . info ( "Iteration<seq2seq4repair_space>{}" , iteration ) ; <END_BUG> Path stateOut = new Path ( output , ( "state-" + iteration ) ) ; double ll = runIteration ( conf , input , stateIn , stateOut , numTopics , numWords , topicSmoothing ) ; double relChange = ( oldLL - ll ) // oldLL ; LDADriver . log . info ( "Iteration<seq2seq4repair_space>{}<seq2seq4repair_space>finished.<seq2seq4repair_space>Log<seq2seq4repair_space>Likelihood:<seq2seq4repair_space>{}" , iteration , ll ) ; LDADriver . log . info ( "(Old<seq2seq4repair_space>LL:<seq2seq4repair_space>{})" , oldLL ) ; LDADriver . log . info ( "(Rel<seq2seq4repair_space>Change:<seq2seq4repair_space>{})" , relChange ) ; converged = ( iteration > 3 ) && ( relChange < ( LDADriver . OVERALL_CONVERGENCE ) ) ; stateIn = stateOut ; oldLL = ll ; } } private static void writeInitialState ( Path statePath , int numTopics , int numWords ) throws IOException { } private static double findLL ( Path statePath , Configuration job ) throws IOException { } private double runIteration ( Configuration conf , Path input , Path stateIn , Path stateOut , int numTopics , int numWords , double topicSmoothing ) throws IOException , ClassNotFoundException , InterruptedException { } }

Fix:
LDADriver . log . info ( "LDA<seq2seq4repair_space>Iteration<seq2seq4repair_space>{}" , iteration ) ;
Buggy code:
public class ConnectionManager implements Watcher { protected static final Logger log = LoggerFactory . getLogger ( ConnectionManager . class ) ; private final String name ; private final CountDownLatch clientConnected = new CountDownLatch ( 1 ) ; private boolean connected = false ; private final ZkClientConnectionStrategy connectionStrategy ; private final String zkServerAddress ; private final SolrZkClient client ; private final OnReconnect onReconnect ; private final BeforeReconnect beforeReconnect ; private volatile KeeperState state = KeeperState . Disconnected ; private volatile boolean isClosed = false ; private volatile boolean likelyExpired = true ; private volatile Timer disconnectedTimer ; public ConnectionManager ( String name , SolrZkClient client , String zkServerAddress , ZkClientConnectionStrategy strat , OnReconnect onConnect , BeforeReconnect beforeReconnect ) { } private synchronized void connected ( ) { } private synchronized void disconnected ( ) { } private void cancelTimer ( ) { } @ Override public void process ( WatchedEvent event ) { } public synchronized boolean isConnected ( ) { } public void close ( ) { } public boolean isLikelyExpired ( ) { } public synchronized void waitForConnected ( long waitForConnection ) throws TimeoutException { ConnectionManager . log . info ( "Waiting<seq2seq4repair_space>for<seq2seq4repair_space>client<seq2seq4repair_space>to<seq2seq4repair_space>connect<seq2seq4repair_space>to<seq2seq4repair_space>ZooKeeper" ) ; long expire = ( System . currentTimeMillis ( ) ) + waitForConnection ; long left = 1 ; while ( ( ! ( connected ) ) && ( left > 0 ) ) { if ( isClosed ) { break ; } try { wait ( 500 ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; <START_BUG> throw new RuntimeException ( e ) ; <END_BUG> } left = expire - ( System . currentTimeMillis ( ) ) ; } if ( ! ( connected ) ) { throw new TimeoutException ( ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>connect<seq2seq4repair_space>to<seq2seq4repair_space>ZooKeeper<seq2seq4repair_space>" + ( zkServerAddress ) ) + "<seq2seq4repair_space>within<seq2seq4repair_space>" ) + waitForConnection ) + "<seq2seq4repair_space>ms" ) ) ; } ConnectionManager . log . info ( "Client<seq2seq4repair_space>is<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>ZooKeeper" ) ; } public synchronized void waitForDisconnected ( long timeout ) throws InterruptedException , TimeoutException { } private void closeKeeper ( SolrZooKeeper keeper ) { } }

Fix:
break ;
Buggy code:
public class ComputeSecurityGroupServiceImpl extends BaseComputeServices implements ComputeSecurityGroupService { @ Override public List < ? extends SecGroupExtension > list ( ) { } @ Override public List < ? extends SecGroupExtension > listServerGroups ( String serverId ) { Preconditions . checkNotNull ( serverId ) ; <START_BUG> return get ( SecurityGroups . class , uri ( "//os-security-groups//servers//%s//os-security-groups" , serverId ) ) . execute ( ) . getList ( ) ; <END_BUG> } @ Override public SecGroupExtension get ( String securityGroupId ) { } @ Override public ActionResponse delete ( String securityGroupId ) { } @ Override public SecGroupExtension create ( String name , String description ) { } @ Override public SecGroupExtension update ( String securityGroupId , String name , String description ) { } @ Override public Rule createRule ( Rule rule ) { } @ Override public ActionResponse deleteRule ( String ruleId ) { } }

Fix:
return get ( SecurityGroups . class , uri ( "//servers//%s//os-security-groups" , serverId ) ) . execute ( ) . getList ( ) ;
Buggy code:
public class Sash extends Control { boolean dragging ; int startX ; int startY ; int lastX ; int lastY ; int defaultCursor ; private static final int INCREMENT = 1 ; private static final int PAGE_INCREMENT = 9 ; public Sash ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( int index ) { <START_BUG> state |= HANDLE ; <END_BUG> handle = OS . g_object_new ( display . gtk_fixed_get_type ( ) , 0 ) ; if ( ( handle ) == 0 ) error ( ERROR_NO_HANDLES ) ; OS . gtk_fixed_set_has_window ( handle , true ) ; OS . GTK_WIDGET_SET_FLAGS ( handle , GTK_CAN_FOCUS ) ; int type = ( ( ( style ) & ( SWT . VERTICAL ) ) != 0 ) ? OS . GDK_SB_H_DOUBLE_ARROW : OS . GDK_SB_V_DOUBLE_ARROW ; defaultCursor = OS . gdk_cursor_new ( type ) ; } void drawBand ( int x , int y , int width , int height ) { } int gtk_button_press_event ( int widget , int eventPtr ) { } int gtk_button_release_event ( int widget , int eventPtr ) { } int gtk_focus_in_event ( int widget , int event ) { } int gtk_key_press_event ( int widget , int eventPtr ) { } int gtk_motion_notify_event ( int widget , int eventPtr ) { } int gtk_realize ( int widget ) { } void hookEvents ( ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void setCursor ( int cursor ) { } int traversalCode ( int key , GdkEventKey event ) { } }

Fix:
state |= ( HANDLE ) | ( THEME_BACKGROUND ) ;
Buggy code:
public class AbstractTrialverseController { static final Logger logger = LoggerFactory . getLogger ( AbstractTrialverseController . class ) ; public static class ErrorResponse { public int code ; public String message ; public ErrorResponse ( int code , String message ) { } } @ ResponseStatus ( HttpStatus . NOT_FOUND ) @ ExceptionHandler ( ResourceDoesNotExistException . class ) @ ResponseBody public AbstractTrialverseController . ErrorResponse handleResourceDoesNotExist ( HttpServletRequest request ) { } @ ResponseStatus ( HttpStatus . FORBIDDEN ) @ ExceptionHandler ( MethodNotAllowedException . class ) @ ResponseBody public AbstractTrialverseController . ErrorResponse handleResourceNotOwned ( HttpServletRequest request ) { } @ ResponseStatus ( HttpStatus . BAD_REQUEST ) @ ExceptionHandler ( InvalidDataAccessApiUsageException . class ) @ ResponseBody public AbstractTrialverseController . ErrorResponse handleIllegalArgumentException ( HttpServletRequest request ) { } @ ResponseStatus ( HttpStatus . INTERNAL_SERVER_ERROR ) @ ExceptionHandler ( UpdateGraphException . class ) @ ResponseBody public AbstractTrialverseController . ErrorResponse handleGraphUpdateException ( HttpServletRequest request ) { } @ ResponseStatus ( HttpStatus . INTERNAL_SERVER_ERROR ) @ ExceptionHandler ( ReadGraphException . class ) @ ResponseBody public AbstractTrialverseController . ErrorResponse handleGraphReadException ( HttpServletRequest request ) { } @ ResponseStatus ( HttpStatus . INTERNAL_SERVER_ERROR ) @ ExceptionHandler ( RevisionNotFoundException . class ) @ ResponseBody public AbstractTrialverseController . ErrorResponse handleRevisionNotFoundException ( HttpServletRequest request , Exception e ) { AbstractTrialverseController . logger . error ( "Error<seq2seq4repair_space>retrieving<seq2seq4repair_space>revision<seq2seq4repair_space>\n{}" , request . getQueryString ( ) ) ; <START_BUG> AbstractTrialverseController . logger . error ( "Exception:<seq2seq4repair_space>" , e . toString ( ) ) ; <END_BUG> return new AbstractTrialverseController . ErrorResponse ( 500 , "Internal<seq2seq4repair_space>server<seq2seq4repair_space>error" ) ; } }

Fix:
AbstractTrialverseController . logger . error ( "Exception:<seq2seq4repair_space>" , e ) ;
Buggy code:
public class ReducerValueUpdater implements ValueUpdater < Object > { List < TridentTuple > tuples ; ReducerAggregator agg ; public ReducerValueUpdater ( ReducerAggregator agg , List < TridentTuple > tuples ) { } @ Override public Object update ( Object stored ) { <START_BUG> Object ret = ( stored == null ) ? this . agg . init ( ) : stored ; <END_BUG> for ( TridentTuple t : tuples ) { ret = this . agg . reduce ( ret , t ) ; } return ret ; } }

Fix:
Object ret = stored ;
Buggy code:
public class DriveStraight extends PositionCommand { private PIDController angleController ; private double distance ; private double heading ; private double maxSpeed ; private boolean headingSet = false ; private Point p = null ; private static final double DEAD_ZONE = 2.0 ; public DriveStraight ( double distance , double heading , double speed ) { } public DriveStraight ( Point coord , double speed ) { } protected void initialize ( ) { } protected void execute ( ) { if ( ! ( this . headingSet ) ) { if ( ( p ) != null ) { double x = ( p . x ) - ( Robot . CURRENT_X ) ; double y = ( p . y ) - ( Robot . CURRENT_Y ) ; double movementEncured = Math . pow ( ( ( x * x ) + ( y * y ) ) , 0.5 ) ; distance = movementEncured ; this . heading = drive . getAngle ( ) ; this . headingSet = true ; <START_BUG> SmartDashboard . putNumber ( ( ( ( ( "Point<seq2seq4repair_space>(" + ( p . x ) ) + "," ) + ( p . y ) ) + ")<seq2seq4repair_space>DriveStraight<seq2seq4repair_space>heading:<seq2seq4repair_space>" ) , heading ) ; <END_BUG> } } double angleCommand = angleController . update ( getError ( ) ) ; drive . move ( ( ( maxSpeed ) + angleCommand ) , ( ( maxSpeed ) - angleCommand ) ) ; } protected boolean isFinished ( ) { } protected void end ( ) { } protected void interrupted ( ) { } private double getError ( ) { } }

Fix:
super . initialize ( ) ;
Buggy code:
public class CSVDataSetBeanInfo extends BeanInfoSupport { private static final String FILENAME = "filename" ; private static final String FILE_ENCODING = "fileEncoding" ; private static final String VARIABLE_NAMES = "variableNames" ; private static final String DELIMITER = "delimiter" ; private static final String RECYCLE = "recycle" ; private static final String STOPTHREAD = "stopThread" ; private static final String QUOTED_DATA = "quotedData" ; private static final String SHAREMODE = "shareMode" ; private static final String [ ] SHARE_TAGS = new String [ 3 ] ; static final int SHARE_ALL = 0 ; static final int SHARE_GROUP = 1 ; static final int SHARE_THREAD = 2 ; public CSVDataSetBeanInfo ( ) { } public static int getShareModeAsInt ( String mode ) { <START_BUG> if ( ( mode . length ( ) ) == 0 ) { <END_BUG> return CSVDataSetBeanInfo . SHARE_ALL ; } for ( int i = 0 ; i < ( CSVDataSetBeanInfo . SHARE_TAGS . length ) ; i ++ ) { if ( CSVDataSetBeanInfo . SHARE_TAGS [ i ] . equals ( mode ) ) { return i ; } } return - 1 ; } }

Fix:
if ( ( mode == null ) || ( ( mode . length ( ) ) == 0 ) ) {
Buggy code:
public class TestPresentTag extends JspTestCase { protected static final String COOKIE_KEY = "org.apache.struts.taglib.logic.COOKIE_KEY" ; protected static final String HEADER_KEY = "org.apache.struts.taglib.logic.HEADER_KEY" ; protected static final String PARAMETER_KEY = "org.apache.struts.taglib.logic.PARAMETER_KEY" ; public TestPresentTag ( String theName ) { } public static void main ( String [ ] theArgs ) { } public static Test suite ( ) { } public void testApplicationScopeObjectPresent ( ) throws ServletException , JspException { } public void testApplicationScopeObjectNotPresent ( ) throws ServletException , JspException { } public void testSessionScopeObjectPresent ( ) throws ServletException , JspException { } public void testSessionScopeObjectNotPresent ( ) throws ServletException , JspException { } public void testRequestScopeObjectPresent ( ) throws ServletException , JspException { } public void testRequestScopeObjectNotPresent ( ) throws ServletException , JspException { } public void testPageScopeObjectPresent ( ) throws ServletException , JspException { } public void testPageScopeObjectNotPresent ( ) throws ServletException , JspException { } public void testApplicationScopePropertyPresent ( ) throws ServletException , JspException { } public void testApplicationScopePropertyNotPresent ( ) throws ServletException , JspException { } public void testRequestScopePropertyPresent ( ) throws ServletException , JspException { } public void testRequestScopePropertyNotPresent ( ) throws ServletException , JspException { PresentTag pt = new PresentTag ( ) ; <START_BUG> String testKey = "testRequestScopePropertyPresent" ; <END_BUG> String testStringValue = null ; LabelValueBean lvb = new LabelValueBean ( "The<seq2seq4repair_space>Key" , testStringValue ) ; pageContext . setAttribute ( testKey , lvb , REQUEST_SCOPE ) ; pt . setPageContext ( pageContext ) ; pt . setName ( testKey ) ; pt . setScope ( "request" ) ; pt . setProperty ( "value" ) ; assertEquals ( "Property<seq2seq4repair_space>present<seq2seq4repair_space>(not<seq2seq4repair_space>null)" , false , pt . condition ( true ) ) ; } public void beginCookiePresent ( WebRequest testRequest ) { } public void testCookiePresent ( ) throws ServletException , JspException { } public void testCookieNotPresent ( ) throws ServletException , JspException { } public void beginHeaderPresent ( WebRequest testRequest ) { } public void testHeaderPresent ( ) throws ServletException , JspException { } public void testHeaderNotPresent ( ) throws ServletException , JspException { } public void beginParameterPresent ( WebRequest testRequest ) { } public void testParameterPresent ( ) throws ServletException , JspException { } public void testParameterNotPresent ( ) throws ServletException , JspException { } }

Fix:
String testKey = "testRequestScopePropertyNotPresent" ;
Buggy code:
public class SelfSignedMitmManager implements MitmManager { SelfSignedSslEngineSource selfSignedSslEngineSource = new SelfSignedSslEngineSource ( true ) ; @ Override public SSLEngine serverSslEngine ( ) { } @ Override public SSLEngine clientSslEngineFor ( SSLSession serverSslSession ) { <START_BUG> return selfSignedSslEngineSource . newSslEngine ( serverSslSession ) ; <END_BUG> } }

Fix:
return selfSignedSslEngineSource . clientSslEngineFor ( serverSslSession ) ;
Buggy code:
public class SettingActivity extends AppCompatPreferenceActivity { private static final String TAG = "SettingAct" ; private OnSharedPreferenceChangeListener mListener ; private static Context ctx ; private SettingActivity . Callback mCallback ; public interface Callback { public void onPreferenceChanged ( SharedPreferences sp , String key ) { } } @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; Lg . i ( SettingActivity . TAG , "onCreste" ) ; addPreferencesFromResource ( preferences ) ; SettingActivity . ctx = getApplicationContext ( ) ; SharedPreferences sp = PreferenceManager . getDefaultSharedPreferences ( SettingActivity . ctx ) ; NotificationControll n = NotificationControll . getInstance ( ) ; n . initialize ( getApplicationContext ( ) ) ; mCallback = n ; mListener = new SharedPreferences . OnSharedPreferenceChangeListener ( ) { public void onSharedPreferenceChanged ( SharedPreferences sp , String key ) { Lg . i ( SettingActivity . TAG , ( "shared<seq2seq4repair_space>preference<seq2seq4repair_space>changed<seq2seq4repair_space>" + key ) ) ; if ( ( mCallback ) != null ) { mCallback . onPreferenceChanged ( sp , key ) ; } <START_BUG> Intent i = new Intent ( SettingActivity . ctx , BrightnessSwitchProvider . class ) ; <END_BUG> i . setAction ( BRIGHT_SETTING_ACTION ) ; SettingActivity . ctx . sendBroadcast ( i ) ; } } ; sp . registerOnSharedPreferenceChangeListener ( mListener ) ; boolean useNotification = sp . getBoolean ( "enableNotification" , false ) ; n . update ( useNotification ) ; } @ Override protected void onDestroy ( ) { } }

Fix:
Intent i = new Intent ( SettingActivity . ctx , BrightnessSwitchProvider1 . class ) ;
Buggy code:
public class WriteReplaceInterceptor implements Interceptor { private final String serviceName ; public WriteReplaceInterceptor ( final String serviceName ) { } @ Override public Object processInvocation ( final InterceptorContext context ) throws Exception { <START_BUG> SessionID sessionId = ( ( SessionID ) ( context . getPrivateData ( SESSION_ID_KEY ) ) ) ; <END_BUG> return new StatefulSerializedProxy ( serviceName , sessionId ) ; } public static class Factory implements InterceptorFactory { private final String serviceName ; public Factory ( final String serviceName ) { } @ Override public Interceptor create ( final InterceptorFactoryContext context ) { } } }

Fix:
SessionID sessionId = ( ( SessionID ) ( context . getPrivateData ( SessionID . class ) ) ) ;
Buggy code:
public class CsvWriter extends AbstractWriter < CsvWriterSettings > { private final char separator ; private final char quotechar ; private final char escapechar ; private final boolean ignoreLeading ; private final boolean ignoreTrailing ; private final boolean quoteAllFields ; private final char newLine ; public CsvWriter ( Writer writer , CsvWriterSettings settings ) { } @ Override protected void processRow ( Object [ ] row ) { for ( int i = 0 ; i < ( row . length ) ; i ++ ) { if ( i != 0 ) { appendToRow ( separator ) ; } String nextElement = getStringValue ( row [ i ] ) ; boolean isElementQuoted = quoteElement ( nextElement ) ; if ( isElementQuoted ) { appender . append ( quotechar ) ; } int originalLength = appender . length ( ) ; append ( isElementQuoted , nextElement ) ; if ( ( ( ( appender . length ( ) ) == originalLength ) && ( ( nullValue ) != null ) ) && ( ! ( nullValue . isEmpty ( ) ) ) ) { if ( isElementQuoted ) { append ( isElementQuoted , emptyValue ) ; } else { append ( isElementQuoted , nullValue ) ; } } if ( isElementQuoted ) { <START_BUG> appender . append ( quotechar ) ; <END_BUG> } appendValueToRow ( ) ; } } private boolean quoteElement ( String nextElement ) { } private void append ( boolean isElementQuoted , String element ) { } }

Fix:
appender . appendIgnoringWhitespace ( quotechar ) ;
Buggy code:
public final class DeferredAttrNSImpl extends AttrNSImpl implements DeferredNode { static final long serialVersionUID = 6074924934945957154L ; protected transient int fNodeIndex ; DeferredAttrNSImpl ( DeferredDocumentImpl ownerDocument , int nodeIndex ) { } public int getNodeIndex ( ) { } protected void synchronizeData ( ) { needsSyncData ( false ) ; DeferredDocumentImpl ownerDocument = ( ( DeferredDocumentImpl ) ( ownerDocument ( ) ) ) ; int attrQName = ownerDocument . getNodeName ( fNodeIndex ) ; StringPool pool = ownerDocument . getStringPool ( ) ; name = pool . toString ( attrQName ) ; int index = name . indexOf ( ':' ) ; String prefix ; if ( index < 0 ) { prefix = null ; localName = name ; } else { prefix = name . substring ( 0 , index ) ; localName = name . substring ( ( index + 1 ) ) ; } isSpecified ( ( ( ownerDocument . getNodeValue ( fNodeIndex ) ) == 1 ) ) ; namespaceURI = pool . toString ( ownerDocument . getNodeURI ( fNodeIndex ) ) ; <START_BUG> if ( ( namespaceURI ) == null ) { <END_BUG> if ( prefix != null ) { if ( prefix . equals ( "xmlns" ) ) { namespaceURI = "http:////www.w3.org//2000//xmlns//" ; } } else if ( name . equals ( "xmlns" ) ) { namespaceURI = "http:////www.w3.org//2000//xmlns//" ; } } } protected void synchronizeChildren ( ) { } }

Fix:
if ( ( ( namespaceURI ) == null ) && ( ( namespaceURI . length ( ) ) == 0 ) ) {