nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SubscriberSampler extends BaseJMSSampler implements Interruptible , TestListener , ThreadListener { private static final long serialVersionUID = 240L ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final long DEFAULT_WAIT = 500L ; private transient ReceiveSubscriber SUBSCRIBER = null ; private volatile transient boolean interrupted = false ; private transient long timeout ; private transient boolean useReceive ; private transient Exception exceptionDuringInit ; private transient boolean stopBetweenSamples ; private static final String CLIENT_CHOICE = "jms.client_choice" ; private static final String TIMEOUT = "jms.timeout" ; private static final String TIMEOUT_DEFAULT = "" ; private static final String DURABLE_SUBSCRIPTION_ID = "jms.durableSubscriptionId" ; private static final String CLIENT_ID = "jms.clientId" ; private static final String DURABLE_SUBSCRIPTION_ID_DEFAULT = "" ; private static final String CLIENT_ID_DEFAULT = "" ; private static final String STOP_BETWEEN = "jms.stop_between_samples" ; private transient boolean START_ON_SAMPLE = false ; public SubscriberSampler ( ) { } private void initListenerClient ( ) throws JMSException , NamingException { } private void initReceiveClient ( ) throws JMSException , NamingException { } @ Override public SampleResult sample ( ) { } private long calculateWait ( long until , long now ) { } private void extractContent ( StringBuilder buffer , StringBuilder propBuffer , Message msg ) { } public void threadStarted ( ) { } public void threadStarted ( boolean wts ) { } public void threadFinished ( ) { } public void threadFinished ( boolean wts ) { } public boolean interrupt ( ) { } public void setClientChoice ( String choice ) { } public String getClientChoice ( ) { } public String getTimeout ( ) { } public long getTimeoutAsLong ( ) { } public void setTimeout ( String timeout ) { } public String getDurableSubscriptionId ( ) { } public String getClientId ( ) { <START_BUG> return getPropertyAsString ( SubscriberSampler . CLIENT_ID ) ; <END_BUG> } public void setDurableSubscriptionId ( String durableSubscriptionId ) { } public void setClientID ( String clientId ) { } private static final String RECEIVE_STR = JMeterUtils . getResString ( RECEIVE_RSC ) ; public boolean isStopBetweenSamples ( ) { } public void setStopBetweenSamples ( boolean selected ) { } public void testEnded ( ) { } public void testEnded ( String host ) { } public void testIterationStart ( LoopIterationEvent event ) { } public void testStarted ( ) { } public void testStarted ( String host ) { } }

Fix:
return getPropertyAsString ( SubscriberSampler . CLIENT_ID , SubscriberSampler . CLIENT_ID_DEFAULT ) ;
Buggy code:
public class AndroidAssets extends AbstractAssets { private final AssetManager assets ; private String pathPrefix = null ; AndroidAssets ( AssetManager assets ) { } public void setPathPrefix ( String prefix ) { } private InputStream openAsset ( String path ) throws IOException { } @ Override protected Image doGetImage ( String path ) { } Bitmap doGetBitmap ( String path ) { } private Bitmap decodeBitmap ( InputStream is ) { } private Bitmap createErrorBitmap ( Exception e ) { } private class ErrorSound implements Sound { private final String path ; private final IOException exception ; public ErrorSound ( String path , IOException exception ) { } @ Override public boolean play ( ) { } @ Override public void stop ( ) { } @ Override public void setLooping ( boolean looping ) { } @ Override public void setVolume ( float volume ) { } @ Override public boolean isPlaying ( ) { } @ Override public void addCallback ( ResourceCallback < Sound > callback ) { } } @ Override protected Sound doGetSound ( String path ) { try { InputStream in = openAsset ( ( path + ".mp3" ) ) ; <START_BUG> return instance . audio ( ) . getSound ( ( path + ".mp3" ) , in ) ; <END_BUG> } catch ( IOException e ) { log ( ) . error ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>sound:<seq2seq4repair_space>" + path ) , e ) ; return new AndroidAssets . ErrorSound ( path , e ) ; } } @ Override protected void doGetText ( final String path , final ResourceCallback < String > callback ) { } public static abstract class DownloaderTask < T > extends AsyncTask < String , Void , T > { private ResourceCallback < T > callback ; public DownloaderTask ( ) { } public DownloaderTask ( ResourceCallback < T > callback ) { } @ Override protected T doInBackground ( String ... params ) { } public abstract T download ( String url ) { } @ Override protected void onPostExecute ( T data ) { } } public Bitmap downloadBitmap ( String url ) { } }

Fix:
return instance . audio ( ) . createSound ( ( path + ".mp3" ) , in ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class JBossASEmbeddedInContainerTestCase { @ Deployment public static JavaArchive createDeployment ( ) throws Exception { } @ Test public void testDeployedService ( ) throws Exception { MBeanServer mbeanServer = ManagementFactory . getPlatformMBeanServer ( ) ; ObjectName objectName = new ObjectName ( "jboss:name=test,type=config" ) ; waitForMbean ( mbeanServer , objectName ) ; <START_BUG> Object o = mbeanServer . getAttribute ( objectName , "IntervalSeconds" ) ; <END_BUG> mbeanServer . setAttribute ( objectName , new Attribute ( "IntervalSeconds" , 2 ) ) ; } protected void waitForMbean ( MBeanServer mbeanServer , ObjectName name ) throws Exception { } }

Fix:
mbeanServer . getAttribute ( objectName , "IntervalSeconds" ) ;
Buggy code:
public class ProgramCounter implements Clockable { Pin pcIn = new Pin ( ) ; Pin pcOut = new Pin ( ) ; Pin control = new Pin ( ) ; public ProgramCounter ( ) { } public void clockEdge ( ) { <START_BUG> if ( new BinaryNum ( "0" ) . equals ( control ) ) { <END_BUG> pcOut . setValue ( pcIn . getValue ( ) ) ; } } }

Fix:
if ( new BinaryNum ( "0" ) . equals ( control . getValue ( ) ) ) {
Buggy code:
public class SpringEL300Tests extends ExpressionTestCase { @ Test public void testNPE_SPR5661 ( ) { } @ Test public void testSPR5899 ( ) throws Exception { } static class MyTypeLocator extends StandardTypeLocator { public Class < ? > findType ( String typename ) throws EvaluationException { } } static class Spr5899Class { public Spr5899Class ( ) { } public Spr5899Class ( Integer i ) { } public Spr5899Class ( Integer i , String ... s ) { } public Integer tryToInvokeWithNull ( Integer value ) { } public Integer tryToInvokeWithNull2 ( int i ) { } public String tryToInvokeWithNull3 ( Integer value , String ... strings ) { } public String toString ( ) { } } @ Test public void testSPR5905_InnerTypeReferences ( ) throws Exception { } static class Outer { static class Inner { public Inner ( ) { } public static int run ( ) { } public int run2 ( ) { } } } @ SuppressWarnings ( "unchecked" ) @ Test public void testSPR5804 ( ) throws Exception { } @ Test public void testSPR5847 ( ) throws Exception { } static class TestProperties { public Properties jdbcProperties = new Properties ( ) ; public Properties foo = new Properties ( ) ; TestProperties ( ) { } } static class MapAccessor implements PropertyAccessor { public boolean canRead ( EvaluationContext context , Object target , String name ) throws AccessException { } public TypedValue read ( EvaluationContext context , Object target , String name ) throws AccessException { <START_BUG> return new TypedValue ( ( ( Map ) ( target ) ) . get ( name ) , TypeDescriptor . valueOf ( Object . class ) ) ; <END_BUG> } public boolean canWrite ( EvaluationContext context , Object target , String name ) throws AccessException { } @ SuppressWarnings ( "unchecked" ) public void write ( EvaluationContext context , Object target , String name , Object newValue ) throws AccessException { } public Class [ ] getSpecificTargetClasses ( ) { } } @ Test public void testNPE_SPR5673 ( ) throws Exception { } @ Test public void testAccessingNullPropertyViaReflection_SPR5663 ( ) throws AccessException { } private void checkTemplateParsing ( String expression , String expectedValue ) throws Exception { } private void checkTemplateParsing ( String expression , ParserContext context , String expectedValue ) throws Exception { } private void checkTemplateParsingError ( String expression , String expectedMessage ) throws Exception { } private void checkTemplateParsingError ( String expression , ParserContext context , String expectedMessage ) throws Exception { } private static final ParserContext DOLLARSQUARE_TEMPLATE_PARSER_CONTEXT = new ParserContext ( ) { public String getExpressionPrefix ( ) { } public String getExpressionSuffix ( ) { } public boolean isTemplate ( ) { } } ; }

Fix:
return new TypedValue ( ( ( Map ) ( target ) ) . get ( name ) , TypeDescriptor . OBJECT ) ;
Buggy code:
public class UnitSleep extends Unit { Node sleepNode ; public UnitSleep ( ) { } public UnitSleep ( Node sleepNode ) { } @ Override public boolean perform ( Mob mob ) throws ActionNotPossibleException { if ( ( Global . getNodeOutOfPoint ( mob . getPosition ( ) ) ) != ( sleepNode ) ) throw new ActionNotPossibleException ( "Could<seq2seq4repair_space>Not<seq2seq4repair_space>Sleep,<seq2seq4repair_space>Because<seq2seq4repair_space>He<seq2seq4repair_space>Was<seq2seq4repair_space>Ordered<seq2seq4repair_space>Around!" ) ; mob . setAnimation ( new SpeechBubble ( 100 , "zzz" ) ) ; if ( mob instanceof Human ) { if ( ( ( ( Human ) ( mob ) ) . getHome ( ) ) == ( Global . getNodeOutOfPoint ( mob . getPosition ( ) ) ) ) { mob . addSleep ( 0.1 ) ; mob . addStamina ( 0.1 ) ; } else { Random r = new Random ( ) ; if ( ( r . nextInt ( 3 ) ) == 0 ) { mob . addSleep ( 0.1 ) ; mob . addStamina ( 0.1 ) ; } <START_BUG> if ( ( r . nextInt ( 600 ) ) == 0 ) { <END_BUG> mob . setTask ( null ) ; } } } return true ; } }

Fix:
if ( ( r . nextInt ( 400 ) ) == 0 ) {
Buggy code:
public abstract class CategorizedProblem implements IProblem { public static final int CAT_UNSPECIFIED = 0 ; public static final int CAT_BUILDPATH = 10 ; public static final int CAT_SYNTAX = 20 ; public static final int CAT_IMPORT = 30 ; public static final int CAT_TYPE = 40 ; public static final int CAT_MEMBER = 50 ; public static final int CAT_INTERNAL = 60 ; public static final int CAT_JAVADOC = 70 ; public static final int CAT_CODE_STYLE = 80 ; public static final int CAT_POTENTIAL_PROGRAMMING_PROBLEM = 90 ; public static final int CAT_NAME_SHADOWING_CONFLICT = 100 ; public static final int CAT_DEPRECATION = 110 ; public static final int CAT_UNNECESSARY_CODE = 120 ; public static final int CAT_UNCHECKED_RAW = 130 ; public static final int CAT_NLS = 140 ; public static final int CAT_RESTRICTION = 150 ; public abstract int getCategoryID ( ) { } public abstract String getMarkerType ( ) { } public String [ ] getExtraMarkerAttributeNames ( ) { <START_BUG> return EMPTY_NAMES ; <END_BUG> } public Object [ ] getExtraMarkerAttributeValues ( ) { } }

Fix:
return CharOperation . NO_STRINGS ;
Buggy code:
public class PictureChoiceActivity extends Activity { private static final int SELECT_PICTURE = 1 ; private static final int CAMERA_CAPTURE = 2 ; private static final int PIC_CROP = 3 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_picture_choice ) ; Button defaultBtn = ( ( Button ) ( findViewById ( defaultBtn ) ) ) ; Button pictureBtn = ( ( Button ) ( findViewById ( pictBtn ) ) ) ; Button cameraBtn = ( ( Button ) ( findViewById ( cameraBtn ) ) ) ; pictureBtn . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intent = new Intent ( ) ; intent . setType ( "image//*" ) ; <START_BUG> intent . setAction ( ACTION_GET_CONTENT ) ; <END_BUG> startActivityForResult ( Intent . createChooser ( intent , "Select<seq2seq4repair_space>Picture" ) , PictureChoiceActivity . SELECT_PICTURE ) ; } } ) ; cameraBtn . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intent = new Intent ( MediaStore . ACTION_IMAGE_CAPTURE ) ; startActivityForResult ( intent , PictureChoiceActivity . CAMERA_CAPTURE ) ; } } ) ; defaultBtn . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intent = new Intent ( PictureChoiceActivity . this , PuzzleActivity . class ) ; intent . addCategory ( "Test" ) ; startActivity ( intent ) ; } } ) ; } protected void onActivityResult ( int requestCode , int resultCode , Intent imageReturnedIntent ) { } private Uri getImageUri ( Context inContext , Bitmap inImage ) { } private void pictureCrop ( Uri picUri ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
intent . setAction ( ACTION_PICK ) ;
Buggy code:
double [ ] ssqs1 = MemoryManager . malloc8d ( ( nbins + 1 ) ) ; long [ ] ns1 = MemoryManager . malloc8 ( ( nbins + 1 ) ) ; for ( int b = nbins - 1 ; b >= 0 ; b -- ) { double m0 = sums1 [ ( b + 1 ) ] ; double m1 = sums [ b ] ; double s0 = ssqs1 [ ( b + 1 ) ] ; double s1 = ssqs [ b ] ; long k0 = ns1 [ ( b + 1 ) ] ; long k1 = bins [ b ] ; if ( ( k0 == 0 ) && ( k1 == 0 ) ) continue ; sums1 [ b ] = m0 + m1 ; ssqs1 [ b ] = s0 + s1 ; ns1 [ b ] = k0 + k1 ; assert ( ( ns0 [ b ] ) + ( ns1 [ b ] ) ) == tot ; } int best = 0 ; double best_se0 = Double . MAX_VALUE ; double best_se1 = Double . MAX_VALUE ; byte equal = 0 ; for ( int b = 1 ; b <= ( nbins - 1 ) ; b ++ ) { if ( ( bins [ b ] ) == 0 ) continue ; if ( ( ns0 [ b ] ) < min_rows ) continue ; if ( ( ns1 [ b ] ) < min_rows ) break ; double se0 = ( ssqs0 [ b ] ) - ( ( ( sums0 [ b ] ) * ( sums0 [ b ] ) ) // ( ns0 [ b ] ) ) ; double se1 = ( ssqs1 [ b ] ) - ( ( ( sums1 [ b ] ) * ( sums1 [ b ] ) ) // ( ns1 [ b ] ) ) ; if ( ( ( se0 + se1 ) < ( best_se0 + best_se1 ) ) || ( ( ( se0 + se1 ) == ( best_se0 + best_se1 ) ) && ( ( Math . abs ( ( b - ( nbins > > 1 ) ) ) ) < ( Math . abs ( ( best - ( nbins > > 1 ) ) ) ) ) ) ) { best_se0 = se0 ; best_se1 = se1 ; best = b ; } } if ( ( ( ( ( _isInt ) > 0 ) && ( ( _step ) == 1.0F ) ) && ( ( ( _maxEx ) - ( _min ) ) > 2 ) ) && ( idxs == null ) ) { for ( int b = 1 ; b <= ( nbins - 1 ) ; b ++ ) { if ( ( bins [ b ] ) < min_rows ) continue ; long N = ( ns0 [ b ] ) + ( ns1 [ ( b + 1 ) ] ) ; if ( N < min_rows ) continue ; double sums2 = ( sums0 [ b ] ) + ( sums1 [ ( b + 1 ) ] ) ; double ssqs2 = ( ssqs0 [ b ] ) + ( ssqs1 [ ( b + 1 ) ] ) ; double si = ssqs2 - ( ( sums2 * sums2 ) // N ) ; double sx = ( ssqs [ b ] ) - ( ( ( sums [ b ] ) * ( sums [ b ] ) ) // ( bins [ b ] ) ) ; if ( ( si + sx ) < ( best_se0 + best_se1 ) ) { best_se0 = si ; best_se1 = sx ; best = b ; equal = 1 ; } } } IcedBitSet bs = null ; if ( idxs != null ) { int min = Integer . MAX_VALUE ; int max = Integer . MIN_VALUE ; for ( int i = best ; i < nbins ; i ++ ) { min = Math . min ( min , idxs [ i ] ) ; max = Math . max ( max , idxs [ i ] ) ; } bs = new IcedBitSet ( ( ( max - min ) + 1 ) , min ) ; for ( int i = best ; i < nbins ; i ++ ) bs . set ( idxs [ i ] ) ; <START_BUG> equal = ( ( byte ) ( ( ( bs . max ( ) ) < 32 ) ? 2 : 3 ) ) ; <END_BUG> } if ( best == 0 ) return null ; double se = ( ssqs1 [ 0 ] ) - ( ( ( sums1 [ 0 ] ) * ( sums1 [ 0 ] ) ) // ( ns1 [ 0 ] ) ) ; if ( se <= ( best_se0 + best_se1 ) ) return null ; long n0 = ( equal != 1 ) ? ns0 [ best ] : ( ns0 [ best ] ) + ( ns1 [ ( best + 1 ) ] ) ; long n1 = ( equal != 1 ) ? ns1 [ best ] : bins [ best ] ; double p0 = ( equal != 1 ) ? sums0 [ best ] : ( sums0 [ best ] ) + ( sums1 [ ( best + 1 ) ] ) ; double p1 = ( equal != 1 ) ? sums1 [ best ] : sums [ best ] ; return new DTree . Split ( col , best , bs , equal , se , best_se0 , best_se1 , n0 , n1 , ( p0 // n0 ) , ( p1 // n1 ) ) ; } @ Override public long byteSize0 ( ) { } }

Fix:
equal = ( ( byte ) ( ( ( bs . max ( ) ) <= 32 ) ? 2 : 3 ) ) ;
Buggy code:
public class GUIleftPanel { public GUIleftPanel ( GUImain main ) { } private final GUImain main ; private JPanel jStatePanel ; private JLabel jStateLabel ; private RSyntaxTextArea jSourcePane ; private JPanel jSourceCodeContainer ; private JInputDataPane jInputPane ; private JTextArea jOutputPane ; private int inputHighlightOffset ; private final List < Object [ ] > codeRegister ; public JSplitPane init ( JFrame jFrame ) { } public void updateFontSize ( ) { } private void highlightInputPane ( ) { } public String getSourceCode ( ) { } public void highlightSourceCode ( int line ) { } public void highlightSourceCodeDirectly ( int line ) { } public void increaseInputHighlighter ( ) throws InterruptedException , InvocationTargetException { } public void resetInputHighlighter ( ) { } public void resetOutputTextPane ( ) { } public void lockInput ( ) { } public void unlockInput ( ) { } public void setReadyMode ( ) { } public void setErrorMode ( String file , String [ ] title , int line ) { this . unlockInput ( ) ; this . resetInputHighlighter ( ) ; this . jStatePanel . setBackground ( new Color ( 255 , 131 , 131 ) ) ; this . jStateLabel . setText ( ( ( ( ( ( ( "<html>!<seq2seq4repair_space>!<seq2seq4repair_space>!<seq2seq4repair_space>" + ( ( title [ 0 ] ) == null ? _ ( "error" ) : title [ 0 ] ) ) + ( ( file == null ) || ( file != "main" ) ? "" : "<seq2seq4repair_space>in<seq2seq4repair_space>file<seq2seq4repair_space>" + file ) ) + "<seq2seq4repair_space>" ) + ( line >= 0 ? ( ( _ ( "in<seq2seq4repair_space>line" ) ) + "<seq2seq4repair_space>" ) + line : "" ) ) + ( ( title [ 1 ] ) == null ? "" : "<seq2seq4repair_space>" + ( title [ 1 ] ) ) ) + "<seq2seq4repair_space>!<seq2seq4repair_space>!<seq2seq4repair_space>!<//html>" ) ) ; if ( line >= 0 ) <START_BUG> this . highlightSourceCodeDirectly ( line ) ; <END_BUG> } public void setRunMode ( ) { } public void setPauseMode ( ) { } public void outputStream ( String s ) { } public String getInputStream ( ) { } public List < Object [ ] > getSourceCodeRegister ( ) { } public RSyntaxTextArea getSourcePane ( ) { } public Rectangle getPositionInSource ( int line , int col ) throws BadLocationException { } public JInputDataPane getInputPane ( ) { } public JTextArea getOutputPane ( ) { } }

Fix:
this . highlightSourceCode ( line ) ;
Buggy code:
public class KafkaReporter extends ScheduledReporter { private static final Logger LOGGER = LoggerFactory . getLogger ( KafkaReporter . class ) ; private final Producer < String , byte [ ] > producer ; private final ProducerConfig config ; private final String topic ; private final ObjectMapper mapper = new ObjectMapper ( ) ; protected long lastSerializeExceptionTime ; protected final Closer closer ; public final Map < String , String > tags ; protected KafkaReporter ( KafkaReporter . Builder < ? > builder ) { } public static KafkaReporter . Builder < ? > forRegistry ( MetricRegistry registry ) { } public static KafkaReporter . Builder < ? > forContext ( MetricContext context ) { } private static class BuilderImpl extends KafkaReporter . Builder < KafkaReporter . BuilderImpl > { public BuilderImpl ( MetricRegistry registry ) { } @ Override protected KafkaReporter . BuilderImpl self ( ) { } } public static abstract class Builder < T extends KafkaReporter . Builder < T > > { protected MetricRegistry registry ; protected String name ; protected MetricFilter filter ; protected TimeUnit rateUnit ; protected TimeUnit durationUnit ; protected Map < String , String > tags ; protected String brokers ; protected String topic ; protected Builder ( MetricRegistry registry ) { } protected abstract T self ( ) { } public T filter ( MetricFilter filter ) { } public T convertRatesTo ( TimeUnit rateUnit ) { } public T convertDurationsTo ( TimeUnit durationUnit ) { } public T withTags ( Map < String , String > tags ) { } public T withTags ( List < Tag < ? > > tags ) { } public T withTag ( String key , String value ) { } public KafkaReporter build ( String brokers , String topic ) { } } public static class Metric { public String name ; public Object value ; public Map < String , String > tags ; public long timestamp ; } @ Override public void close ( ) { } @ Override public void report ( SortedMap < String , Gauge > gauges , SortedMap < String , Counter > counters , SortedMap < String , Histogram > histograms , SortedMap < String , Meter > meters , SortedMap < String , Timer > timers ) { } protected List < byte [ ] > serializeGauge ( String name , Gauge gauge ) { } protected List < byte [ ] > serializeCounter ( String name , Counter counter ) { } protected List < byte [ ] > serializeMetered ( String name , Metered meter ) { } protected List < byte [ ] > serializeSnapshot ( String name , Snapshot snapshot ) { } protected List < byte [ ] > serializeSingleValue ( String name , Object value , String ... path ) { } protected byte [ ] serializeValue ( String name , Object value , String ... path ) { String str = stringifyValue ( name , value , path ) ; <START_BUG> if ( Strings . isNullOrEmpty ( str ) ) { <END_BUG> return str . getBytes ( ) ; } else { return null ; } } protected synchronized String stringifyValue ( String name , Object value , String ... path ) { } private List < KeyedMessage < String , byte [ ] > > toKeyedMessages ( List < byte [ ] > bytesArray ) { } }

Fix:
if ( ! ( Strings . isNullOrEmpty ( str ) ) ) {
Buggy code:
public class ModClusterStopContext implements OperationStepHandler , DescriptionProvider { static final ModClusterStopContext INSTANCE = new ModClusterStopContext ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( context . isNormalServer ( ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "stop-context:<seq2seq4repair_space>%s" , operation ) ; ContextHost contexthost = new ContextHost ( operation ) ; modcluster . stopContext ( contexthost . webhost , contexthost . webcontext , contexthost . waittime ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( NAME ) ) != null ) ) {
Buggy code:
public class DishList { private static final ArrayList < Dish > dishList = new ArrayList < Dish > ( ) ; private static final HashMap < Integer , Dish > dishMap = new HashMap < Integer , Dish > ( ) ; public static void updateDishes ( ) { } public static ArrayList < Dish > getDishList ( ) { } public static HashMap < Integer , Dish > getDishMap ( ) { } public static boolean addDish ( int price , String name , boolean containsGluten , boolean containsNuts , boolean containsDairy , boolean isVegetarian , boolean isSpicy , String description , boolean isActive ) { <START_BUG> if ( DatabaseConnection . isConnected ( DEFAULT_TIMEOUT ) ) { <END_BUG> System . err . println ( "No<seq2seq4repair_space>valid<seq2seq4repair_space>database<seq2seq4repair_space>connection<seq2seq4repair_space>specified;<seq2seq4repair_space>dish<seq2seq4repair_space>not<seq2seq4repair_space>added<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>database." ) ; return false ; } if ( ( name . length ( ) ) > ( DatabaseConnection . VARCHAR_MAX_LENGTH_LONG ) ) { throw new IllegalArgumentException ( ( ( "The<seq2seq4repair_space>name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>dish<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>" + ( DatabaseConnection . VARCHAR_MAX_LENGTH_LONG ) ) + "<seq2seq4repair_space>characters<seq2seq4repair_space>long." ) ) ; } return DatabaseConnection . insertIntoDB ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "INSERT<seq2seq4repair_space>IGNORE<seq2seq4repair_space>INTO<seq2seq4repair_space>Dishes<seq2seq4repair_space>(Price,<seq2seq4repair_space>Name,<seq2seq4repair_space>ContainsGluten,<seq2seq4repair_space>ContainsNuts,<seq2seq4repair_space>ContainsDairy,<seq2seq4repair_space>IsVegetarian,<seq2seq4repair_space>IsSpicy,<seq2seq4repair_space>Description,<seq2seq4repair_space>isActive)<seq2seq4repair_space>VALUES<seq2seq4repair_space>(" + price ) + ",<seq2seq4repair_space>'" ) + name ) + "',<seq2seq4repair_space>" ) + containsGluten ) + ",<seq2seq4repair_space>" ) + containsNuts ) + ",<seq2seq4repair_space>" ) + containsDairy ) + ",<seq2seq4repair_space>" ) + isVegetarian ) + ",<seq2seq4repair_space>" ) + isSpicy ) + ",<seq2seq4repair_space>'" ) + description ) + "',<seq2seq4repair_space>" ) + isActive ) + ");" ) ) ; } public static boolean changeDishStatus ( Dish dish , boolean newStatus ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( DatabaseConnection . isConnected ( DEFAULT_TIMEOUT ) ) ) {
Buggy code:
public class MultiCommand { private final ArrayList < String > commandList = new ArrayList < String > ( ) ; public void put ( int index , String cmd ) { } public void put ( String cmd ) { } public void run ( EditText console ) { for ( String s : commandList ) { System . out . println ( s ) ; <START_BUG> CommandParser . parseInput ( s , console , null ) ; <END_BUG> } } }

Fix:
CommandParser . inputCommand ( s , console , null , false ) ;
Buggy code:
public abstract class Statement extends ASTNode { public abstract FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void branchChainTo ( Label label ) { } public boolean complainIfUnreachable ( FlowInfo flowInfo , BlockScope scope , boolean didAlreadyComplain ) { } public void generateArguments ( MethodBinding binding , Expression [ ] arguments , BlockScope currentScope , CodeStream codeStream ) { if ( binding . isVarargs ( ) ) { TypeBinding [ ] params = binding . parameters ; int paramLength = params . length ; int varArgIndex = paramLength - 1 ; for ( int i = 0 ; i < varArgIndex ; i ++ ) { arguments [ i ] . generateCode ( currentScope , codeStream , true ) ; } ArrayBinding varArgsType = ( ( ArrayBinding ) ( params [ varArgIndex ] ) ) ; ArrayBinding codeGenVarArgsType = ( ( ArrayBinding ) ( binding . parameters [ varArgIndex ] . erasure ( ) ) ) ; int elementsTypeID = varArgsType . elementsType ( ) . id ; int argLength = ( arguments == null ) ? 0 : arguments . length ; if ( argLength > paramLength ) { codeStream . generateInlinedValue ( ( argLength - varArgIndex ) ) ; codeStream . newArray ( codeGenVarArgsType ) ; for ( int i = varArgIndex ; i < argLength ; i ++ ) { codeStream . dup ( ) ; codeStream . generateInlinedValue ( ( i - varArgIndex ) ) ; arguments [ i ] . generateCode ( currentScope , codeStream , true ) ; codeStream . arrayAtPut ( elementsTypeID , false ) ; } } else if ( argLength == paramLength ) { TypeBinding lastType = arguments [ varArgIndex ] . resolvedType ; <START_BUG> if ( ( lastType == ( NullBinding ) ) || ( ( ( varArgsType . dimensions ( ) ) == ( lastType . dimensions ( ) ) ) && ( lastType . isCompatibleWith ( varArgsType ) ) ) ) { <END_BUG> arguments [ varArgIndex ] . generateCode ( currentScope , codeStream , true ) ; } else { codeStream . generateInlinedValue ( 1 ) ; codeStream . newArray ( codeGenVarArgsType ) ; codeStream . dup ( ) ; codeStream . generateInlinedValue ( 0 ) ; arguments [ varArgIndex ] . generateCode ( currentScope , codeStream , true ) ; codeStream . arrayAtPut ( elementsTypeID , false ) ; } } else { codeStream . generateInlinedValue ( 0 ) ; codeStream . newArray ( codeGenVarArgsType ) ; } } else if ( arguments != null ) { for ( int i = 0 , max = arguments . length ; i < max ; i ++ ) arguments [ i ] . generateCode ( currentScope , codeStream , true ) ; } } public abstract void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public boolean isEmptyBlock ( ) { } public boolean isValidJavaStatement ( ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public abstract StringBuffer printStatement ( int indent , StringBuffer output ) { } public abstract void resolve ( BlockScope scope ) { } public Constant resolveCase ( BlockScope scope , TypeBinding testType , SwitchStatement switchStatement ) { } }

Fix:
if ( ( lastType == ( TypeBinding . NULL ) ) || ( ( ( varArgsType . dimensions ( ) ) == ( lastType . dimensions ( ) ) ) && ( lastType . isCompatibleWith ( varArgsType ) ) ) ) {
Buggy code:
@ Service public class ResourceServiceImpl extends PinkElephantTaggedService implements ResourceService { private final Logger logger = LoggerFactory . getLogger ( this . getClass ( ) ) ; private final String RESOURCE_FILES_PATH = "resourcefiles//" ; @ Autowired private ResourceRepository resourceRepository ; @ Autowired private GroupService groupService ; @ Autowired private MeetingService meetingService ; @ Autowired private NoteService noteService ; @ Autowired private DiscussionService discussionService ; @ Autowired private EntityRelationRepository entityRelationRepository ; @ Autowired private TagService tagService ; @ Override public void save ( TaggedEntity entity ) { } @ Override public Resource findById ( String resourceId ) { } @ Override public List < Resource > findByIds ( List < String > resourceIds ) { } @ Override public Resource createExternalResource ( CreateResourceRequest request ) { } public ResourceResponse downloadResource ( String resourceId ) throws FileNotFoundException { } @ Override public Resource uploadResource ( byte [ ] bytes , String name , String groupId , String authToken ) { } public boolean delete ( BasicDeleteRequest request ) { } public List < Resource > queryResourcesOfGroup ( QueryResourceRequest request ) { List < Resource > resources = new ArrayList < > ( ) ; if ( ( request . getNoteId ( ) ) != null ) { Note note = noteService . findById ( request . getNoteId ( ) ) ; resources = note . getResources ( ) ; } if ( ( request . getGroupId ( ) ) != null ) { <START_BUG> Group group = groupService . findById ( request . getNoteId ( ) ) ; <END_BUG> resources = resourceRepository . findResources ( group . getId ( ) ) ; } return resources ; } @ Override protected TagService getTagService ( ) { } @ Override protected ResourceService getResourceService ( ) { } @ Override protected MeetingService getMeetingService ( ) { } @ Override protected DiscussionService getDiscussionService ( ) { } @ Override protected EntityRelationRepository getEntityRelationRepository ( ) { } @ Override public List < EntityRelation > findRelationById ( String meetindId ) { } }

Fix:
Group group = groupService . findById ( request . getGroupId ( ) ) ;
Buggy code:
public class ClientCallFuture < V > implements ICompletableFuture < V > , Callback { static final ILogger LOGGER = Logger . getLogger ( ClientCallFuture . class ) ; private final int heartBeatInterval ; private final int retryCount ; private final int retryWaitTime ; private volatile Object response ; private final ClientRequest request ; private final ClientExecutionServiceImpl executionService ; private final ClientInvocationServiceImpl invocationService ; private final ClientListenerServiceImpl clientListenerService ; private final SerializationService serializationService ; private final EventHandler handler ; private AtomicInteger reSendCount = new AtomicInteger ( ) ; private volatile ClientConnection connection ; private List < ClientCallFuture < V > . ExecutionCallbackNode > callbackNodeList = new LinkedList < ClientCallFuture < V > . ExecutionCallbackNode > ( ) ; public ClientCallFuture ( HazelcastClientInstanceImpl client , ClientRequest request , EventHandler handler ) { } @ Override public boolean cancel ( boolean mayInterruptIfRunning ) { } @ Override public boolean isCancelled ( ) { } @ Override public boolean isDone ( ) { } @ Override public V get ( ) throws InterruptedException , ExecutionException { } @ Override public V get ( long timeout , TimeUnit unit ) throws InterruptedException , ExecutionException , TimeoutException { } private boolean isConnectionHealthy ( long elapsed ) { if ( elapsed >= ( heartBeatInterval ) ) { <START_BUG> return connection . isHeartBeating ( ) ; <END_BUG> } return true ; } @ Override public void notify ( Object response ) { } private void setResponse ( Object response ) { } private V resolveResponse ( ) throws InterruptedException , ExecutionException , TimeoutException { } @ Override public void andThen ( ExecutionCallback < V > callback ) { } @ Override public void andThen ( ExecutionCallback < V > callback , Executor executor ) { } public void andThenInternal ( ExecutionCallback < Data > callback ) { } public ClientRequest getRequest ( ) { } public EventHandler getHandler ( ) { } public ClientConnection getConnection ( ) { } public boolean resend ( ) { } private void sleep ( ) { } private void runAsynchronous ( final ExecutionCallback callback , Executor executor , final boolean deserialized ) { } public void setConnection ( ClientConnection connection ) { } class ReSendTask implements Runnable { @ Override public void run ( ) { } } class ExecutionCallbackNode { final ExecutionCallback callback ; final Executor executor ; final boolean deserialized ; ExecutionCallbackNode ( ExecutionCallback callback , Executor executor , boolean deserialized ) { } } }

Fix:
return ( connection . isAlive ( ) ) && ( connection . isHeartBeating ( ) ) ;
Buggy code:
public class NumberCard extends JLabel { private static final long serialVersionUID = - 4999587614115223052L ; private String value ; private String strValue ; private int width = 80 ; private int height = 100 ; private int numberTag ; private String home ; private final String imageFile ; private ImageIcon img ; private ImageGenerator imgGen ; public NumberCard ( ) { } public NumberCard ( double n ) { } public NumberCard ( String s ) { } public String getHome ( ) { } public void setHome ( String home ) { } public static double parseNumFromText ( String s ) { } public static double round ( double n ) { double q = n // ( MathGame . epsilon ) ; <START_BUG> q = Math . floor ( ( q + 0.5 ) ) ; <END_BUG> n = q * ( MathGame . epsilon ) ; return n ; } public String getValue ( ) { } public void setValue ( String value ) { } public String getStrValue ( ) { } public void setStrValue ( String strValue ) { } @ Override public int getWidth ( ) { } public void setWidth ( int width ) { } @ Override public int getHeight ( ) { } public void setHeight ( int height ) { } public int getNumberTag ( ) { } public void setNumberTag ( int numberTag ) { } public void renderText ( String t ) { } @ Override public void paintComponent ( Graphics g ) { } }

Fix:
q = Math . floor ( ( q + 0.05 ) ) ;
Buggy code:
public class ClaimantAddClaimController { private ClaimList claimList = null ; public ClaimantAddClaimController ( ClaimList claimList ) { } public void addClaim ( String claimName , String begin , String end ) { Claim claim = new Claim ( claimName ) ; Date beginDate = null ; Date endDate = null ; try { beginDate = AppSingleton . getDateFormat ( ) . parse ( begin ) ; } catch ( ParseException e ) { beginDate = null ; } try { endDate = AppSingleton . getDateFormat ( ) . parse ( end ) ; } catch ( ParseException e ) { endDate = null ; } claim . setBeginDate ( beginDate ) ; claim . setEndDate ( endDate ) ; <START_BUG> if ( ( ( claimName . equals ( "" ) ) || ( begin . equals ( "" ) ) ) || ( end . equals ( "" ) ) ) { <END_BUG> claim . setMissValue ( true ) ; } else { claim . setMissValue ( false ) ; } claim . addModelListener ( new Listener ( ) { @ Override public void update ( ) { claimList . notifyListeners ( ) ; } } ) ; claimList . getClaimList ( ) . add ( claim ) ; claimList . notifyListeners ( ) ; } }

Fix:
if ( ( ( claimName . equals ( "" ) ) || ( begin == null ) ) || ( end == null ) ) {
Buggy code:
public abstract class BaseLdapSuiteReferralsTest extends BaseLdapSuiteTest { public static final String SLAVE_CONNECTION_NAME = "SlaveConnection" ; public static final String DEFAULT_SEARCH_DN = "uid=wildfly,dc=simple,dc=wildfly,dc=org" ; public static final String DEFAULT_SEARCH_CREDENTIAL = "wildfly_password" ; @ Override protected void addAddOutboundConnectionOperations ( List < ModelNode > bootOperations ) throws Exception { bootOperations . add ( OutboundConnectionAddBuilder . builder ( MASTER_CONNECTION_NAME ) . setUrl ( ( ( ( "ldap:////" + ( LdapTestSuite . HOST_NAME ) ) + ":" ) + ( LdapTestSuite . MASTER_LDAP_PORT ) ) ) . setSearchDn ( getSearchDn ( ) ) . setSearchCredential ( getSearchCredential ( ) ) . setReferrals ( getReferrals ( ) ) . build ( ) ) ; <START_BUG> bootOperations . add ( OutboundConnectionAddBuilder . builder ( BaseLdapSuiteReferralsTest . SLAVE_CONNECTION_NAME ) . setUrl ( ( ( ( "ldap:////" + ( LdapTestSuite . HOST_NAME ) ) + ":" ) + ( LdapTestSuite . SLAVE_LDAP_PORT ) ) ) . setSearchDn ( BaseLdapSuiteReferralsTest . DEFAULT_SEARCH_DN ) . setSearchCredential ( BaseLdapSuiteReferralsTest . DEFAULT_SEARCH_CREDENTIAL ) . addHandlesReferralsFor ( ( ( ( "ldap:////" + ( LdapTestSuite . HOST_NAME ) ) + ":" ) + ( LdapTestSuite . MASTER_LDAP_PORT ) ) ) . addHandlesReferralsFor ( "ldap:////dummy:389" ) . build ( ) ) ; <END_BUG> } protected String getSearchDn ( ) { } protected String getSearchCredential ( ) { } protected ReferralHandling getReferrals ( ) { } }

Fix:
bootOperations . add ( OutboundConnectionAddBuilder . builder ( BaseLdapSuiteReferralsTest . SLAVE_CONNECTION_NAME ) . setUrl ( ( ( ( "ldap:////" + ( LdapTestSuite . HOST_NAME ) ) + ":" ) + ( LdapTestSuite . SLAVE_LDAP_PORT ) ) ) . setSearchDn ( BaseLdapSuiteReferralsTest . DEFAULT_SEARCH_DN ) . setSearchCredential ( BaseLdapSuiteReferralsTest . DEFAULT_SEARCH_CREDENTIAL ) . addHandlesReferralsFor ( ( ( ( "ldap:////" + ( LdapTestSuite . HOST_NAME ) ) + ":" ) + ( LdapTestSuite . SLAVE_LDAP_PORT ) ) ) . addHandlesReferralsFor ( "ldap:////dummy:389" ) . build ( ) ) ;
Buggy code:
public class PropertyImpl implements IProperty { private String name ; private String value ; private PropertyImpl ( ) { } public PropertyImpl ( String name , String value ) throws IllegalArgumentException { } @ Override public String getName ( ) { } private void setName ( String name ) throws IllegalArgumentException { } @ Override public String getValue ( ) { } private void setValue ( String value ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( "{name:<seq2seq4repair_space>" + ( this . getName ( ) ) ) + ",<seq2seq4repair_space>value:<seq2seq4repair_space>" ) + ( this . getValue ( ) ) ) + "}" ; <END_BUG> } }

Fix:
return ( ( this . getName ( ) ) + "=" ) + ( this . getValue ( ) ) ;
Buggy code:
public class PearsonsCorrelation { private final RealMatrix correlationMatrix ; private final int nObs ; public PearsonsCorrelation ( ) { } public PearsonsCorrelation ( double [ ] [ ] data ) { } public PearsonsCorrelation ( RealMatrix matrix ) { } public PearsonsCorrelation ( Covariance covariance ) { } public PearsonsCorrelation ( RealMatrix covarianceMatrix , int numberOfObservations ) { } public RealMatrix getCorrelationMatrix ( ) { } public RealMatrix getCorrelationStandardErrors ( ) { } public RealMatrix getCorrelationPValues ( ) throws MathException { TDistribution tDistribution = new TDistributionImpl ( ( ( nObs ) - 2 ) ) ; int nVars = correlationMatrix . getColumnDimension ( ) ; double [ ] [ ] out = new double [ nVars ] [ nVars ] ; for ( int i = 0 ; i < nVars ; i ++ ) { for ( int j = 0 ; j < nVars ; j ++ ) { if ( i == j ) { out [ i ] [ j ] = 0.0 ; } else { double r = correlationMatrix . getEntry ( i , j ) ; double t = Math . abs ( ( r * ( Math . sqrt ( ( ( ( nObs ) - 2 ) // ( 1 - ( r * r ) ) ) ) ) ) ) ; <START_BUG> out [ i ] [ j ] = 2 * ( 1 - ( tDistribution . cumulativeProbability ( t ) ) ) ; <END_BUG> } } } return new BlockRealMatrix ( out ) ; } public RealMatrix computeCorrelationMatrix ( RealMatrix matrix ) { } public RealMatrix computeCorrelationMatrix ( double [ ] [ ] data ) { } public double correlation ( final double [ ] xArray , final double [ ] yArray ) throws IllegalArgumentException { } public RealMatrix covarianceToCorrelation ( RealMatrix covarianceMatrix ) { } private void checkSufficientData ( final RealMatrix matrix ) { } }

Fix:
out [ i ] [ j ] = 2 * ( tDistribution . cumulativeProbability ( ( - t ) ) ) ;
Buggy code:
public final class TestMapReduce extends MahoutTestCase { private final Collection < VectorWritable > sampleData = Lists . newArrayList ( ) ; private FileSystem fs ; private Configuration conf ; private void addSample ( double [ ] values ) { } private void generateSamples ( int num , double mx , double my , double sd ) { } private void generateAsymmetricSamples ( int num , double mx , double my , double sdx , double sdy ) { } @ Override @ Before public void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> conf = new Configuration ( ) ; <END_BUG> fs = FileSystem . get ( conf ) ; } @ Test public void testDriverIterationsSeq ( ) throws Exception { } @ Test public void testDriverIterationsMR ( ) throws Exception { } @ Test public void testDriverIterationsMahalanobisSeq ( ) throws Exception { } @ Test public void testDriverIterationsMahalanobisMR ( ) throws Exception { } private static void printModels ( Iterable < List < Cluster > > result ) { } private Iterable < List < Cluster > > getClusters ( Path output , int numIterations ) throws IOException { } }

Fix:
conf = getConfiguration ( ) ;
Buggy code:
public class DBConnection { private static final Logger logger ; private static final MongoClientURI mongoClientURI = new MongoClientURI ( System . getenv ( "MONGOLAB_URI" ) ) ; private static final MongoClient client = new MongoClient ( DBConnection . mongoClientURI ) ; private static final MongoDatabase db = DBConnection . client . getDatabase ( DBConnection . mongoClientURI . getDatabase ( ) ) ; private static final String imageUrlCollectionName = "imageUrl" ; private static final String blackListCollectionName = "blackList" ; private static final String lastStatusCollectionName = "lastStatus" ; private static final String urlKey = "url" ; private static final String reportedUserKey = "reporteduser" ; private static final String statusIdKey = "statusid" ; private static final String lastStatusKey = "laststatus" ; public static void storeImageUrl ( Status succeededStatus , FetchedImage fetchedImage ) { } public static void storeImageUrlToBlackList ( Status reply ) { MongoCollection < Document > imageUrlCollection = DBConnection . db . getCollection ( DBConnection . imageUrlCollectionName ) ; <START_BUG> Document imageUrlDoc = imageUrlCollection . find ( Filters . eq ( DBConnection . statusIdKey , reply . getId ( ) ) ) . first ( ) ; <END_BUG> if ( imageUrlDoc != null ) { String url = imageUrlDoc . getString ( DBConnection . urlKey ) ; MongoCollection < Document > blackListCollection = DBConnection . db . getCollection ( DBConnection . blackListCollectionName ) ; Document doc = new Document ( DBConnection . urlKey , url ) ; doc . put ( DBConnection . reportedUserKey , reply . getUser ( ) . getScreenName ( ) ) ; blackListCollection . insertOne ( doc ) ; } else { DBConnection . logger . log ( Level . WARNING , "Image<seq2seq4repair_space>URL<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>data<seq2seq4repair_space>collection" ) ; } } public static boolean isInBlackList ( String link ) { } public static Status getLastStatus ( ) { } public static void setLastStatus ( Status status ) { } private static String toBase64 ( Status status ) { } private static Status fromBase64 ( String s ) { } }

Fix:
Document imageUrlDoc = imageUrlCollection . find ( Filters . eq ( DBConnection . statusIdKey , reply . getInReplyToStatusId ( ) ) ) . first ( ) ;
Buggy code:
public class AjaxNavigationToolbar extends NavigationToolbar { private static final long serialVersionUID = 1L ; public AjaxNavigationToolbar ( final String id , final DataTable < ? > table ) { } @ Override protected PagingNavigator newPagingNavigator ( String navigatorId , final DataTable < ? > table ) { return new AjaxPagingNavigator ( navigatorId , table ) { private static final long serialVersionUID = 1L ; @ Override protected void onAjaxEvent ( AjaxRequestTarget target ) { <START_BUG> target . addComponent ( table ) ; <END_BUG> } } ; } }

Fix:
target . add ( table ) ;
Buggy code:
public class EntitySupport { private static final Logger log = Logger . getLogger ( EntitySupport . class . getName ( ) ) ; private static EntityManagerFactory emf = null ; private EntityManager em ; private boolean isBeginTransaction = false ; private boolean isPersist = false ; public EntitySupport ( ) { } public void beginTransaction ( ) { } public < E > boolean persist ( E entity ) { } public boolean commit ( ) { } public void closeEntityManager ( ) { } private static void initEntityManagerFactory ( ) { if ( ( EntitySupport . emf ) == null ) { EntitySupport . emf = Persistence . createEntityManagerFactory ( "persistenceUnit" ) ; <START_BUG> EntitySupport . log . info ( "EntityManagerFactory<seq2seq4repair_space>initialized" ) ; <END_BUG> } } public static EntityManagerFactory getEntityManagerFactory ( ) { } public static EntityManager newEntityManager ( ) { } public static < E > boolean save ( EntityManager em , E entity ) { } public static < E > boolean update ( EntityManager em , E entity ) { } public static < E > boolean delete ( EntityManager em , E entity ) { } public static void closeEntityManagerFactory ( ) { } }

Fix:
EntitySupport . log . info ( "EntityManagerFactory<seq2seq4repair_space>initialized\n" ) ;
Buggy code:
public abstract class AbstractDefaultAjaxBehavior extends AbstractAjaxBehavior { private static final long serialVersionUID = 1L ; public static final ResourceReference INDICATOR = new ResourceReference ( AbstractDefaultAjaxBehavior . class , "indicator.gif" ) ; private static final ResourceReference JAVASCRIPT = new JavascriptResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax.js" ) ; private static final ResourceReference JAVASCRIPT_DEBUG = new JavascriptResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax-debug.js" ) ; protected void onBind ( ) { } public void renderHead ( IHeaderResponse response ) { } protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } protected CharSequence getCallbackScript ( ) { } protected CharSequence getCallbackScript ( boolean onlyTargetActivePage ) { } protected CharSequence getCallbackScript ( final CharSequence partialCall , final CharSequence onSuccessScript , final CharSequence onFailureScript ) { } protected CharSequence getCallbackScript ( final CharSequence partialCall , final CharSequence onSuccessScript , final CharSequence onFailureScript , final CharSequence precondition ) { } private String findIndicatorId ( ) { if ( ( getComponent ( ) ) instanceof IAjaxIndicatorAware ) { return ( ( IAjaxIndicatorAware ) ( getComponent ( ) ) ) . getAjaxIndicatorMarkupId ( ) ; } if ( ( this ) instanceof IAjaxIndicatorAware ) { return ( ( IAjaxIndicatorAware ) ( this ) ) . getAjaxIndicatorMarkupId ( ) ; } Component parent = getComponent ( ) . getParent ( ) ; while ( parent != null ) { if ( parent instanceof IAjaxIndicatorAware ) { return ( ( IAjaxIndicatorAware ) ( parent ) ) . getAjaxIndicatorMarkupId ( ) ; } <START_BUG> parent = getComponent ( ) . getParent ( ) ; <END_BUG> } return null ; } public final void onRequest ( ) { } protected abstract void respond ( AjaxRequestTarget target ) { } public static final CharSequence throttleScript ( CharSequence script , String throttleId , Duration throttleDelay ) { } }

Fix:
parent = parent . getParent ( ) ;