nus-yam/ex-repair huggingface dataset:
Buggy code:
public class WeldTransactionServices implements Service < WeldTransactionServices > , TransactionServices { public static final ServiceName SERVICE_NAME = ServiceName . of ( "WeldTransactionServices" ) ; private final InjectedValue < UserTransaction > injectedTransaction = new InjectedValue < UserTransaction > ( ) ; private final InjectedValue < TransactionManager > injectedTransactionManager = new InjectedValue < TransactionManager > ( ) ; @ Override public UserTransaction getUserTransaction ( ) { } @ Override public boolean isTransactionActive ( ) { try { <START_BUG> final int status = injectedTransaction . getValue ( ) . getStatus ( ) ; <END_BUG> return ( ( ( ( ( status == ( Status . STATUS_ACTIVE ) ) || ( status == ( Status . STATUS_COMMITTING ) ) ) || ( status == ( Status . STATUS_MARKED_ROLLBACK ) ) ) || ( status == ( Status . STATUS_PREPARED ) ) ) || ( status == ( Status . STATUS_PREPARING ) ) ) || ( status == ( Status . STATUS_ROLLING_BACK ) ) ; } catch ( SystemException e ) { throw new RuntimeException ( e ) ; } } @ Override public void cleanup ( ) { } @ Override public void registerSynchronization ( Synchronization synchronizedObserver ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } @ Override public WeldTransactionServices getValue ( ) throws IllegalArgumentException , IllegalStateException { } public InjectedValue < UserTransaction > getInjectedTransaction ( ) { } public InjectedValue < TransactionManager > getInjectedTransactionManager ( ) { } }

Fix:
final int status = injectedTransactionManager . getValue ( ) . getStatus ( ) ;
Buggy code:
public class Rapture extends ApplicationAdapter { protected static World world = null ; public static boolean create_world = false ; public static int players = 0 ; @ Override public void create ( ) { } @ Override public void render ( ) { HandleKeys ( ) ; if ( Rapture . create_world ) { Rapture . world = new World ( ) ; Generator . Generate ( Rapture . world ) ; Rapture . create_world = false ; } if ( MenuController . IsInMenu ( ) ) MenuController . Update ( ) ; else if ( ( Rapture . world ) != null ) Rapture . world . Update ( ) ; Renderer . ClearScreen ( ) ; Renderer . StartWorldBatch ( ) ; if ( ( Rapture . world ) != null ) Rapture . world . Render ( new Vector2f ( Renderer . GetCamera ( ) . position . x , Renderer . GetCamera ( ) . position . y ) , new Vector2f ( Renderer . GetCamera ( ) . viewportWidth , Renderer . GetCamera ( ) . viewportHeight ) ) ; Renderer . EndWorldBatch ( ) ; Renderer . StartScreenBatch ( ) ; if ( MenuController . IsInMenu ( ) ) MenuController . Draw ( ) ; else { } <START_BUG> Renderer . DrawText ( ( "FPS:<seq2seq4repair_space>" + ( graphics . getFramesPerSecond ( ) ) ) , new Vector2f ( 24 , 680 ) , WHITE , 1.0F ) ; <END_BUG> Renderer . EndScreenBatch ( ) ; } protected void HandleKeys ( ) { } }

Fix:
Renderer . DrawText ( ( "FPS:<seq2seq4repair_space>" + ( graphics . getFramesPerSecond ( ) ) ) , new Vector2f ( 12 , 700 ) , WHITE , 0.5F ) ;
Buggy code:
public class HttpSolrServer extends SolrServer { private static final String UTF_8 = "UTF-8" ; private static final String DEFAULT_PATH = "//select" ; private static final long serialVersionUID = - 946812319974801896L ; public static final String AGENT = ( "Solr[" + ( HttpSolrServer . class . getName ( ) ) ) + "]<seq2seq4repair_space>1.0" ; private static Logger log = LoggerFactory . getLogger ( HttpSolrServer . class ) ; protected String baseUrl ; protected ModifiableSolrParams invariantParams ; protected volatile ResponseParser parser ; protected volatile RequestWriter requestWriter = new RequestWriter ( ) ; private final HttpClient httpClient ; private boolean followRedirects = false ; private int maxRetries = 0 ; private boolean useMultiPartPost ; private final boolean internalClient ; private Set < String > queryParams = Collections . emptySet ( ) ; public HttpSolrServer ( String baseURL ) { } public HttpSolrServer ( String baseURL , HttpClient client ) { } public HttpSolrServer ( String baseURL , HttpClient client , ResponseParser parser ) { } public Set < String > getQueryParams ( ) { } public void setQueryParams ( Set < String > queryParams ) { } @ Override public NamedList < Object > request ( final SolrRequest request ) throws IOException , SolrServerException { } public NamedList < Object > request ( final SolrRequest request , final ResponseParser processor ) throws IOException , SolrServerException { } public ModifiableSolrParams getInvariantParams ( ) { } public String getBaseURL ( ) { } public void setBaseURL ( String baseURL ) { } public ResponseParser getParser ( ) { } public void setParser ( ResponseParser processor ) { } public HttpClient getHttpClient ( ) { } public void setConnectionTimeout ( int timeout ) { } public void setSoTimeout ( int timeout ) { } public void setFollowRedirects ( boolean followRedirects ) { <START_BUG> this . followRedirects = true ; <END_BUG> HttpClientUtil . setFollowRedirects ( httpClient , followRedirects ) ; } public void setAllowCompression ( boolean allowCompression ) { } public void setMaxRetries ( int maxRetries ) { } public void setRequestWriter ( RequestWriter requestWriter ) { } public UpdateResponse add ( Iterator < SolrInputDocument > docIterator ) throws IOException , SolrServerException { } public UpdateResponse addBeans ( final Iterator < ? > beanIterator ) throws IOException , SolrServerException { } @ Override public void shutdown ( ) { } public void setDefaultMaxConnectionsPerHost ( int max ) { } public void setMaxTotalConnections ( int max ) { } public boolean isUseMultiPartPost ( ) { } public void setUseMultiPartPost ( boolean useMultiPartPost ) { } public static class RemoteSolrException extends SolrException { public RemoteSolrException ( int code , String msg , Throwable th ) { } } }

Fix:
this . followRedirects = followRedirects ;
Buggy code:
public class WebFrameView extends NSObject { public WebFrameView ( ) { } public WebFrameView ( int id ) { } public WebFrameView ( id id ) { } public boolean documentViewShouldHandlePrint ( ) { <START_BUG> return ( OS . objc_msgSend ( this . id , sel_documentViewShouldHandlePrint ) ) != 0 ; <END_BUG> } public void printDocumentView ( ) { } public NSPrintOperation printOperationWithPrintInfo ( NSPrintInfo printInfo ) { } }

Fix:
return OS . objc_msgSend_bool ( this . id , sel_documentViewShouldHandlePrint ) ;
Buggy code:
public class Quiz extends Treasure . Type implements Serializable { private static final long serialVersionUID = - 4757699933744798652L ; private int qid ; private String question ; private String answer1 ; private String answer2 ; private String answer3 ; private String answer4 ; private String answer5 ; private String answer6 ; private Integer lid ; public Quiz ( int quizId , Integer lid , int exp , String question , String answer1 , String answer2 , String answer3 , String answer4 , String answer5 , String answer6 ) { } public Quiz ( int id , int quizId , Integer lid , int exp , String question , String answer1 , String answer2 , String answer3 , String answer4 , String answer5 , String answer6 ) { } public Quiz ( int exp , String question , String answer1 , String answer2 , String answer3 , String answer4 , String answer5 , String answer6 ) { } public String getQuestion ( ) { } public String getAnswer1 ( ) { } public String getAnswer2 ( ) { } public String getAnswer3 ( ) { } public String getAnswer4 ( ) { } public String getAnswer5 ( ) { } public String getAnswer6 ( ) { } public int getQuizId ( ) { } <START_BUG> public int getLocationId ( ) { <END_BUG> return lid ; } @ Override public String getType ( ) { } @ Override public boolean equalsWithoutId ( Object o ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } }

Fix:
public Integer getLocationId ( ) {
Buggy code:
public abstract class AbstractVersionStrategy extends AbstractStrategy implements VersionStrategy { protected Version vers = null ; public void setVersion ( Version owner ) { } public boolean select ( Select sel , ClassMapping mapping ) { } public void load ( OpenJPAStateManager sm , JDBCStore store , Result res ) throws SQLException { } public void afterLoad ( OpenJPAStateManager sm , JDBCStore store ) { } public boolean checkVersion ( OpenJPAStateManager sm , JDBCStore store , boolean updateVersion ) throws SQLException { <START_BUG> return false ; <END_BUG> } public int compareVersion ( Object v1 , Object v2 ) { } public Map getBulkUpdateValues ( ) { } }

Fix:
return ! updateVersion ;
Buggy code:
public class BaseSharedObject implements IIdentifiable , ISharedObject , ISharedObjectInternal { private static long identifier = 0L ; public static final String TRANSACTION_PROPERTY_NAME = ISharedObjectContainerTransaction . class . getName ( ) ; public static final int TRANSACTION_TIMEOUT_DEFAULT = - 1 ; Trace trace = Trace . create ( "basesharedobject" ) ; ISharedObjectConfig config = null ; List eventProcessors = new Vector ( ) ; int transactionTimeout = BaseSharedObject . TRANSACTION_TIMEOUT_DEFAULT ; ISharedObjectContainerTransaction transaction = null ; ID [ ] excludedContainerIDs ; public BaseSharedObject ( int transactionTimeout , ID [ ] excludedContainers ) { } public BaseSharedObject ( int transactionTimeout ) { } public BaseSharedObject ( ) { } protected static long getNextIdentifier ( ) { } private void trace ( String msg ) { } private void traceStack ( String msg , Throwable t ) { } public void addEventProcessor ( IEventProcessor proc ) { } public boolean removeEventProcessor ( IEventProcessor proc ) { } public void clearEventProcessors ( ) { } protected void fireEventProcessors ( Event event ) { } public void init ( ISharedObjectConfig initData ) throws SharedObjectInitException { } protected void initTransaction ( ) { } protected ISharedObjectConfig getConfig ( ) { } public ISharedObjectContext getContext ( ) { } public ID getHomeID ( ) { } protected ID getLocalID ( ) { } protected ID getGroupID ( ) { ISharedObjectContext context = getContext ( ) ; if ( context == null ) { return null ; } else <START_BUG> return context . getGroupID ( ) ; <END_BUG> } public boolean isPrimary ( ) { } protected Map getProperties ( ) { } public void handleEvent ( Event event ) { } protected void handleUnhandledEvent ( Event event ) { } public void handleEvents ( Event [ ] events ) { } public void dispose ( ID containerID ) { } public Object getAdapter ( Class clazz ) { } public ID getID ( ) { } public void destroySelf ( ) { } public void destroySelfLocal ( ) { } public void destroyRemote ( ID remoteID ) throws IOException { } public SharedObjectDescription getReplicaDescription ( ID receiver ) { } public SharedObjectDescription [ ] getReplicaDescriptions ( ID [ ] receivers ) { } }

Fix:
return context . getConnectedID ( ) ;
Buggy code:
public class Chunk extends Mesh { public int [ ] [ ] [ ] blocks ; public boolean changed ; public boolean updating ; public boolean updated ; public boolean empty ; public boolean waiting ; public boolean visible ; public int x_chunk_pos ; public int y_chunk_pos ; public int z_chunk_pos ; public int x_offset ; public int y_offset ; public int z_offset ; public Chunk ( int x_chunk_pos , int y_chunk_pos , int z_chunk_pos ) { } public void rebuild ( ) { } public boolean [ ] renderable_sides ( int x0 , int y0 , int x1 , int y1 , int z ) { } public void update ( ) { if ( ( ( changed ) && ( ! ( updating ) ) ) && ( updated ) ) { updated = false ; chunks_workers_executor_service . add_worker ( new ChunkWorker ( this ) ) ; } <START_BUG> if ( ( ( updated ) && ( updating ) ) && ( ! ( empty ) ) ) { <END_BUG> updating = false ; update_vbo ( ) ; } changed = false ; } public void render ( ) { } }

Fix:
if ( ( updated ) && ( updating ) ) {
Buggy code:
public class OpenAction extends AbstractColumbaAction implements Observer { ColumbaURL url = null ; public OpenAction ( FrameMediator controller ) { } public void actionPerformed ( ActionEvent evt ) { try { Desktop . browse ( url . getRealURL ( ) ) ; } catch ( DesktopException e ) { <START_BUG> JOptionPane . showMessageDialog ( null , GlobalResourceLoader . getString ( "dialog" , "error" , "no_browser" ) , "Error" , JOptionPane . ERROR_MESSAGE ) ; <END_BUG> } } public void update ( Observable arg0 , Object arg1 ) { } }

Fix:
JOptionPane . showMessageDialog ( null , GlobalResourceLoader . getString ( "org.columba.core.i18n.dialog" , "error" , "no_browser" ) , "Error" , JOptionPane . ERROR_MESSAGE ) ;
Buggy code:
public class RDFWriter implements SentenceWriter { private BufferedWriter out ; private SemLink semlink ; private RDF rdf ; private int snum ; public RDFWriter ( File filename ) { } public void write ( Sentence s ) { try { rdf = new RDF ( ) ; <START_BUG> SentenceRDF rdfs = new SentenceRDF ( rdf , semlink , s , ( ++ ( snum ) ) ) ; <END_BUG> rdf . write ( out ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; System . out . println ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>write<seq2seq4repair_space>sentance." ) ; System . exit ( 1 ) ; } } public void close ( ) { } @ Override public void specialwrite ( Sentence s ) { } }

Fix:
SentenceRDF rdfs = new SentenceRDF ( rdf , semlink , s , new Integer ( ( ++ ( snum ) ) ) . toString ( ) ) ;
Buggy code:
@ RestController @ RequestMapping ( "//ms-b" ) public class MessageController { private final AtomicLong counter = new AtomicLong ( ) ; @ RequestMapping ( method = RequestMethod . GET , produces = MediaType . APPLICATION_JSON_VALUE ) @ ResponseStatus ( HttpStatus . OK ) <START_BUG> public Message simpleMessage ( @ RequestParam ( value = "lines" , required = false , defaultValue = "Stranger" ) <END_BUG> String lines ) { System . out . println ( ( ( "MessageController.simpleMessage(" + lines ) + ")" ) ) ; System . out . println ( ( "lines:<seq2seq4repair_space>" + lines ) ) ; int count = Integer . parseInt ( lines ) ; StringBuffer content = new StringBuffer ( ) ; String text = UUID . randomUUID ( ) . toString ( ) ; for ( int i = 0 ; i < count ; i ++ ) { content . append ( ( i + 1 ) ) . append ( ".<seq2seq4repair_space>" ) . append ( text ) . append ( "\n" ) ; } return new Message ( counter . incrementAndGet ( ) , content . toString ( ) ) ; } @ RequestMapping ( method = RequestMethod . GET , value = "//longMessage" , produces = MediaType . APPLICATION_JSON_VALUE ) @ ResponseStatus ( HttpStatus . OK ) public Message longMessage ( @ RequestParam ( value = "lines" , required = false , defaultValue = "1000" ) String lines ) { } @ RequestMapping ( method = RequestMethod . GET , value = "//longMetricMessage" , produces = MediaType . APPLICATION_JSON_VALUE ) @ ResponseStatus ( HttpStatus . OK ) public MessageMetric longMetricMessage ( @ RequestParam ( value = "lines" , required = false , defaultValue = "1000" ) String lines ) { } }

Fix:
public Message simpleMessage ( @ RequestParam ( value = "lines" , required = false , defaultValue = "1" )
Buggy code:
public class DateTextField extends TextField implements ITextFormatProvider { private static final long serialVersionUID = 1L ; public static ITextFormatProvider forDatePattern ( String id , IModel model , String datePattern ) { } public static ITextFormatProvider forDatePattern ( String id , String datePattern ) { <START_BUG> return DateTextField . forDateStyle ( id , null , datePattern ) ; <END_BUG> } public static ITextFormatProvider forDateStyle ( String id , IModel model , String dateStyle ) { } public static ITextFormatProvider forDateStyle ( String id , String dateStyle ) { } public static ITextFormatProvider forShortStyle ( String id ) { } public static DateTextField forShortStyle ( String id , IModel model ) { } public static ITextFormatProvider withConverter ( String id , DateConverter converter ) { } public static ITextFormatProvider withConverter ( String id , IModel model , DateConverter converter ) { } private final DateConverter converter ; protected DateTextField ( String id , IModel model , DateConverter converter ) { } public final IConverter getConverter ( ) { } public final String getTextFormat ( ) { } }

Fix:
return DateTextField . forDatePattern ( id , null , datePattern ) ;
Buggy code:
public class PyramidOutputFormat2 extends FileOutputFormat < TileIndex , RasterLayer > { static class ImageRecordWriter extends RecordWriter < TileIndex , RasterLayer > { private Rasterizer rasterizer ; private final FileSystem outFS ; private final Path outPath ; private boolean vflip ; private TaskAttemptContext task ; ImageRecordWriter ( FileSystem outFs , Path taskOutPath , TaskAttemptContext task ) { } @ Override public void write ( TileIndex tileIndex , RasterLayer r ) throws IOException { } @ Override public void close ( TaskAttemptContext context ) throws IOException , InterruptedException { } } @ Override public RecordWriter < TileIndex , RasterLayer > getRecordWriter ( TaskAttemptContext task ) throws IOException , InterruptedException { <START_BUG> Path file = getDefaultWorkFile ( task , "" ) ; <END_BUG> FileSystem fs = file . getFileSystem ( task . getConfiguration ( ) ) ; return new PyramidOutputFormat2 . ImageRecordWriter ( fs , file , task ) ; } public static class MultiLevelOutputCommitter extends FileOutputCommitter { private Path outPath ; public MultiLevelOutputCommitter ( Path outputPath , TaskAttemptContext context ) throws IOException { } @ Override public void commitJob ( JobContext context ) throws IOException { } } @ Override public synchronized OutputCommitter getOutputCommitter ( TaskAttemptContext context ) throws IOException { } }

Fix:
Path file = getDefaultWorkFile ( task , "" ) . getParent ( ) ;
Buggy code:
public class ReadAttributeHandler extends BaseOperationCommand { private final ArgumentWithValue node ; private final ArgumentWithValue name ; private final ArgumentWithValue includeDefaults ; private final ArgumentWithoutValue verbose ; public ReadAttributeHandler ( CommandContext ctx ) { } @ Override public ModelNode buildRequestWithoutHeaders ( CommandContext ctx ) throws CommandFormatException { } protected void handleResponse ( CommandContext ctx , ModelNode response , boolean composite ) throws CommandFormatException { } protected StringBuilder formatResponse ( CommandContext ctx , ModelNode opResponse , boolean composite , StringBuilder buf ) throws CommandFormatException { } protected OperationRequestAddress getAddress ( CommandContext ctx ) throws CommandFormatException { final ParsedCommandLine args = ctx . getParsedCommandLine ( ) ; final OperationRequestAddress address ; if ( node . isPresent ( args ) ) { address = new org . jboss . as . cli . operation . impl . DefaultOperationRequestAddress ( ctx . getCurrentNodePath ( ) ) ; CommandLineParser . CallbackHandler handler = new org . jboss . as . cli . operation . impl . DefaultCallbackHandler ( address ) ; <START_BUG> String nodePath = args . getOriginalLine ( ) ; <END_BUG> int nodeArgInd = nodePath . indexOf ( "<seq2seq4repair_space>--node=" ) ; if ( nodeArgInd < 0 ) { throw new CommandFormatException ( ( ( "Couldn't<seq2seq4repair_space>locate<seq2seq4repair_space>'<seq2seq4repair_space>--node='<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>line:<seq2seq4repair_space>'" + nodePath ) + "'" ) ) ; } int nodeArgEndInd = nodeArgInd + 8 ; do { nodeArgEndInd = nodePath . indexOf ( '<seq2seq4repair_space>' , nodeArgEndInd ) ; if ( nodeArgEndInd < 0 ) { nodeArgEndInd = nodePath . length ( ) ; } else if ( ( nodePath . charAt ( ( nodeArgEndInd - 1 ) ) ) == '\\' ) { ++ nodeArgEndInd ; } else { break ; } } while ( nodeArgEndInd < ( nodePath . length ( ) ) ) ; nodePath = nodePath . substring ( ( nodeArgInd + 8 ) , nodeArgEndInd ) ; ctx . getCommandLineParser ( ) . parse ( nodePath , handler ) ; } else { address = new org . jboss . as . cli . operation . impl . DefaultOperationRequestAddress ( ctx . getCurrentNodePath ( ) ) ; } return address ; } }

Fix:
String nodePath = args . getSubstitutedLine ( ) ;
Buggy code:
public class OperationSlaveStepHandler { private final LocalHostControllerInfo localHostControllerInfo ; private final Map < String , ProxyController > serverProxies ; private final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry ; OperationSlaveStepHandler ( final LocalHostControllerInfo localHostControllerInfo , Map < String , ProxyController > serverProxies , IgnoredDomainResourceRegistry ignoredDomainResourceRegistry ) { } void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } void addSteps ( final OperationContext context , final ModelNode operation , final ModelNode response , final boolean recordResponse ) throws OperationFailedException { final PathAddress originalAddress = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final ImmutableManagementResourceRegistration originalRegistration = context . getResourceRegistration ( ) ; if ( originalRegistration == null ) { String operationName = operation . require ( OP ) . asString ( ) ; throw new OperationFailedException ( new ModelNode ( ) . set ( DomainControllerMessages . MESSAGES . noHandlerForOperation ( operationName , originalAddress ) ) ) ; } HostControllerExecutionSupport hostControllerExecutionSupport = Factory . create ( operation , localHostControllerInfo . getLocalHostName ( ) , new OperationSlaveStepHandler . LazyDomainModelProvider ( context ) , ignoredDomainResourceRegistry ) ; ModelNode domainOp = hostControllerExecutionSupport . getDomainOperation ( ) ; if ( domainOp != null ) { addBasicStep ( context , domainOp ) ; } ServerOperationResolver resolver = new ServerOperationResolver ( localHostControllerInfo . getLocalHostName ( ) , serverProxies ) ; <START_BUG> ServerOperationsResolverHandler sorh = new ServerOperationsResolverHandler ( resolver , hostControllerExecutionSupport , originalAddress , originalRegistration , response , recordResponse ) ; <END_BUG> context . addStep ( sorh , DOMAIN ) ; } private void addBasicStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { } private static class LazyDomainModelProvider implements HostControllerExecutionSupport . DomainModelProvider { private final OperationContext context ; private ModelNode domainModel ; private LazyDomainModelProvider ( OperationContext context ) { } public ModelNode getDomainModel ( ) { } } }

Fix:
ServerOperationsResolverHandler sorh = new ServerOperationsResolverHandler ( resolver , hostControllerExecutionSupport , originalAddress , originalRegistration , response ) ;
Buggy code:
public class RawTypeBinding extends ParameterizedTypeBinding { public RawTypeBinding ( ReferenceBinding type , ReferenceBinding enclosingType , LookupEnvironment environment ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } public ParameterizedMethodBinding createParameterizedMethod ( MethodBinding originalMethod ) { if ( ( ( originalMethod . typeVariables ) == ( Binding . NO_TYPE_VARIABLES ) ) || ( originalMethod . isStatic ( ) ) ) { return super . createParameterizedMethod ( originalMethod ) ; } <START_BUG> return new ParameterizedGenericMethodBinding ( originalMethod , this , this . environment ) ; <END_BUG> } public int kind ( ) { } public String debugName ( ) { } public char [ ] genericTypeSignature ( ) { } public boolean isEquivalentTo ( TypeBinding otherType ) { } public boolean isIntersectingWith ( TypeBinding otherType ) { } public boolean isParameterizedType ( ) { } public boolean isRawType ( ) { } protected void initializeArguments ( ) { } public char [ ] readableName ( ) { } public char [ ] shortReadableName ( ) { } }

Fix:
return this . environment . createParameterizedGenericMethod ( originalMethod , this ) ;
Buggy code:
public class GenericBinder implements Binder { private BindingFactory bindingFactory ; private String [ ] requiredProperties ; private MessageSource messageSource ; public GenericBinder ( BindingFactory bindingFactory ) { } public void setMessageSource ( MessageSource messageSource ) { } public void setRequired ( String [ ] propertyPaths ) { } public Object getModel ( ) { } protected Binding getBinding ( String property ) { } public BindingResults bind ( Map < String , ? extends Object > sourceValues ) { } protected Map < String , ? extends Object > filter ( Map < String , ? extends Object > sourceValues ) { } private void checkRequired ( Map < String , ? extends Object > sourceValues ) { } private BindingResult bind ( Map . Entry < String , ? extends Object > sourceValue , Binding binding ) { String property = sourceValue . getKey ( ) ; Object value = sourceValue . getValue ( ) ; if ( ! ( binding . isEditable ( ) ) ) { return new PropertyNotEditableResult ( property , value , messageSource ) ; } else { binding . applySourceValue ( value ) ; <START_BUG> if ( ( binding . getStatus ( ) ) == ( BindingStatus . DIRTY ) ) { <END_BUG> binding . commit ( ) ; } return new BindingStatusResult ( property , value , binding . getStatusAlert ( ) ) ; } } }

Fix:
if ( ( binding . getBindingStatus ( ) ) == ( BindingStatus . DIRTY ) ) {
Buggy code:
public class DisplayBikeRacks extends ActionBarActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; Intent intent = getIntent ( ) ; String location = intent . getStringExtra ( LOCATION_KEY ) ; Log . d ( "intent" , ( "Location:<seq2seq4repair_space>" + location ) ) ; TextView textView = new TextView ( this ) ; textView . setTextSize ( 40 ) ; <START_BUG> textView . setText ( ( ( ( string . display_location_text ) + ":<seq2seq4repair_space>" ) + location ) ) ; <END_BUG> setContentView ( textView ) ; } }

Fix:
textView . setText ( ( ( ( getString ( display_location_text ) ) + ":<seq2seq4repair_space>" ) + location ) ) ;
Buggy code:
public class AND_AND_Expression extends BinaryExpression { int rightInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public AND_AND_Expression ( Expression left , Expression right , int operator ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { Constant opConstant ; if ( ( opConstant = left . constant ) != ( NotAConstant ) ) { if ( ( opConstant . booleanValue ( ) ) == true ) { FlowInfo mergedInfo = right . analyseCode ( currentScope , flowContext , flowInfo ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } else { return flowInfo ; } } if ( ( opConstant = right . constant ) != ( NotAConstant ) ) { if ( ( opConstant . booleanValue ( ) ) == true ) { FlowInfo mergedInfo = left . analyseCode ( currentScope , flowContext , flowInfo ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } else { <START_BUG> FlowInfo mergedInfo = left . analyseCode ( currentScope , flowContext , flowInfo ) . unconditionalInits ( ) ; <END_BUG> mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } } if ( ( opConstant = left . conditionalConstant ( ) ) != ( NotAConstant ) ) { if ( ( opConstant . booleanValue ( ) ) == false ) { FlowInfo mergedInfo = left . analyseCode ( currentScope , flowContext , flowInfo ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; right . analyseCode ( currentScope , flowContext , mergedInfo . copy ( ) . markAsFakeReachable ( true ) ) ; return mergedInfo ; } } FlowInfo leftInfo = left . analyseCode ( currentScope , flowContext , flowInfo ) ; FlowInfo rightInfo = leftInfo . initsWhenTrue ( ) . copy ( ) ; rightInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( rightInfo ) ; rightInfo = right . analyseCode ( currentScope , flowContext , rightInfo ) ; FlowInfo mergedInfo = FlowInfo . conditional ( rightInfo . initsWhenTrue ( ) , leftInfo . initsWhenFalse ( ) . unconditionalInits ( ) . mergedWith ( rightInfo . initsWhenFalse ( ) . copy ( ) . unconditionalInits ( ) ) ) ; mergedInitStateIndex = currentScope . methodScope ( ) . recordInitializationStates ( mergedInfo ) ; return mergedInfo ; } public void computeConstant ( BlockScope scope , int leftId , int rightId ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateOptimizedBoolean ( BlockScope currentScope , CodeStream codeStream , Label trueLabel , Label falseLabel , boolean valueRequired ) { } public void generateOptimizedConditionalAnd ( BlockScope currentScope , CodeStream codeStream , Label trueLabel , Label falseLabel , boolean valueRequired ) { } public boolean isCompactableOperation ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
FlowInfo mergedInfo = left . analyseCode ( currentScope , flowContext , flowInfo ) ;
Buggy code:
@ Singleton @ ConcurrencyManagement ( ConcurrencyManagementType . BEAN ) public class AppClientStateSingleton implements AppClientSingletonRemote { private static final Logger logger = Logger . getLogger ( "org.jboss.as.test.appclient" ) ; private volatile CountDownLatch latch = new CountDownLatch ( 1 ) ; private volatile String value ; @ Override public void reset ( ) { } @ Override public void makeAppClientCall ( final String value ) { } @ Override public String awaitAppClientCall ( ) { try { <START_BUG> boolean b = latch . await ( 10 , TimeUnit . SECONDS ) ; <END_BUG> AppClientStateSingleton . logger . info ( ( ( ( "Await<seq2seq4repair_space>returned:<seq2seq4repair_space>" + b ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( value ) ) ) ; if ( ! b ) { ThreadInfo [ ] threadInfos = ManagementFactory . getThreadMXBean ( ) . dumpAllThreads ( true , true ) ; for ( ThreadInfo info : threadInfos ) { AppClientStateSingleton . logger . info ( info ) ; } } return value ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } } }

Fix:
boolean b = latch . await ( 30 , TimeUnit . SECONDS ) ;
Buggy code:
public class TestNumericRangeFilterBuilder extends LuceneTestCase { public void testGetFilterHandleNumericParseErrorStrict ( ) throws Exception { } public void testGetFilterHandleNumericParseError ( ) throws Exception { NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder ( ) ; filterBuilder . setStrictMode ( false ) ; String xml = "<NumericRangeFilter<seq2seq4repair_space>fieldName='AGE'<seq2seq4repair_space>type='int'<seq2seq4repair_space>lowerTerm='-1'<seq2seq4repair_space>upperTerm='NaN'//>" ; Document doc = TestNumericRangeFilterBuilder . getDocumentFromString ( xml ) ; Filter filter = filterBuilder . getFilter ( doc . getDocumentElement ( ) ) ; Directory ramDir = newDirectory ( ) ; IndexWriter writer = new IndexWriter ( ramDir , newIndexWriterConfig ( TEST_VERSION_CURRENT , null ) ) ; writer . commit ( ) ; try { IndexReader reader = new org . apache . lucene . index . SlowMultiReaderWrapper ( IndexReader . open ( ramDir , true ) ) ; try { <START_BUG> assertNull ( filter . getDocIdSet ( ( ( AtomicReaderContext ) ( reader . getTopReaderContext ( ) ) ) ) ) ; <END_BUG> } finally { reader . close ( ) ; } } finally { writer . commit ( ) ; writer . close ( ) ; ramDir . close ( ) ; } } @ SuppressWarnings ( "unchecked" ) public void testGetFilterInt ( ) throws Exception { } @ SuppressWarnings ( "unchecked" ) public void testGetFilterLong ( ) throws Exception { } @ SuppressWarnings ( "unchecked" ) public void testGetFilterDouble ( ) throws Exception { } @ SuppressWarnings ( "unchecked" ) public void testGetFilterFloat ( ) throws Exception { } private static Document getDocumentFromString ( String str ) throws IOException , ParserConfigurationException , SAXException { } }

Fix:
assertNull ( filter . getDocIdSet ( ( ( AtomicReaderContext ) ( reader . getTopReaderContext ( ) ) ) , reader . getLiveDocs ( ) ) ) ;
Buggy code:
public class Client { public static void main ( String [ ] args ) throws IOException { String serverAddress = JOptionPane . showInputDialog ( ( "Enter<seq2seq4repair_space>IP<seq2seq4repair_space>Address<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>machine<seq2seq4repair_space>that<seq2seq4repair_space>is\n" + "running<seq2seq4repair_space>the<seq2seq4repair_space>date<seq2seq4repair_space>service<seq2seq4repair_space>on<seq2seq4repair_space>port<seq2seq4repair_space>9090:" ) ) ; Socket s = new Socket ( serverAddress , 6667 ) ; BufferedReader input = new BufferedReader ( new InputStreamReader ( s . getInputStream ( ) ) ) ; OutputStream outputStream = s . getOutputStream ( ) ; PrintStream output = new PrintStream ( outputStream ) ; String send = "" ; String receive = "" ; ClientChat cc = new ClientChat ( input ) ; Thread chatThread = new Thread ( cc ) ; chatThread . start ( ) ; <START_BUG> while ( ! ( send . equals ( "exit" ) ) ) { <END_BUG> send = JOptionPane . showInputDialog ( "Enter<seq2seq4repair_space>message" ) ; output . println ( send ) ; } output . println ( "closeConnection" ) ; try { chatThread . join ( ) ; } catch ( InterruptedException e ) { System . out . println ( "Couldn't<seq2seq4repair_space>shutdown<seq2seq4repair_space>chatThread" ) ; e . printStackTrace ( ) ; } String answer = input . readLine ( ) ; JOptionPane . showMessageDialog ( null , answer ) ; System . exit ( 0 ) ; } }

Fix:
while ( ( ! ( send . equals ( "exit" ) ) ) && ( ! ( s . isClosed ( ) ) ) ) {
Buggy code:
public class Player { private int posX ; private int posY ; private int numSegments = 3 ; private Move direction = Move . UP ; private ArrayList < Segment > segments = new ArrayList < Segment > ( ) ; private int squareSize = 10 ; private static final HashMap < Move , Move > oppositeDirection = new HashMap < Move , Move > ( ) ; public Player ( int posX , int posY , int squareSize ) { } public Player ( int posX , int posY , int squareSize , int numSegments ) { } public int getPosX ( ) { } public int getPosY ( ) { } public int getNumSegments ( ) { } public ArrayList < Segment > getSegments ( ) { } public void setPosX ( int posX ) { } public void setPosY ( int posY ) { } public void setNumSegments ( int numSegments ) { } public void setDirection ( Move direction ) { } public void move ( int squareSize ) { } public void addSegment ( ) { } public boolean detectGoalCollision ( Goal goal ) { } public boolean detectWallCollision ( Dimension size ) { <START_BUG> if ( ( ( posX ) > ( ( size . getWidth ( ) ) - ( squareSize ) ) ) || ( ( posY ) > ( ( size . getWidth ( ) ) - ( squareSize ) ) ) ) { <END_BUG> return true ; } if ( ( ( posX ) < 0 ) || ( ( posY ) < 0 ) ) { return true ; } return false ; } public boolean detectSelfCollision ( ) { } @ Override public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( posX ) > ( size . getWidth ( ) ) ) || ( ( posY ) > ( size . getWidth ( ) ) ) ) {
Buggy code:
public class NonLinearConjugateGradientOptimizerTest { @ Test public void testTrivial ( ) { } @ Test public void testColumnsPermutation ( ) { } @ Test public void testNoDependency ( ) { } @ Test public void testOneSet ( ) { } @ Test public void testTwoSets ( ) { } @ Test public void testNonInversible ( ) { } @ Test public void testIllConditioned ( ) { NonLinearConjugateGradientOptimizerTest . LinearProblem problem1 = new NonLinearConjugateGradientOptimizerTest . LinearProblem ( new double [ ] [ ] { new double [ ] { 10.0 , 7.0 , 8.0 , 7.0 } , new double [ ] { 7.0 , 5.0 , 6.0 , 5.0 } , new double [ ] { 8.0 , 6.0 , 10.0 , 9.0 } , new double [ ] { 7.0 , 5.0 , 9.0 , 10.0 } } , new double [ ] { 32 , 23 , 33 , 31 } ) ; NonLinearConjugateGradientOptimizer optimizer = new NonLinearConjugateGradientOptimizer ( ConjugateGradientFormula . POLAK_RIBIERE ) ; <START_BUG> optimizer . setMaxEvaluations ( 100 ) ; <END_BUG> optimizer . setConvergenceChecker ( new SimpleScalarValueChecker ( 1.0E-13 , 1.0E-13 ) ) ; BrentSolver solver = new BrentSolver ( 1.0E-15 , 1.0E-15 ) ; optimizer . setLineSearchSolver ( solver ) ; RealPointValuePair optimum1 = optimizer . optimize ( problem1 , MINIMIZE , new double [ ] { 0 , 1 , 2 , 3 } ) ; Assert . assertEquals ( 1.0 , optimum1 . getPoint ( ) [ 0 ] , 1.0E-4 ) ; Assert . assertEquals ( 1.0 , optimum1 . getPoint ( ) [ 1 ] , 1.0E-4 ) ; Assert . assertEquals ( 1.0 , optimum1 . getPoint ( ) [ 2 ] , 1.0E-4 ) ; Assert . assertEquals ( 1.0 , optimum1 . getPoint ( ) [ 3 ] , 1.0E-4 ) ; NonLinearConjugateGradientOptimizerTest . LinearProblem problem2 = new NonLinearConjugateGradientOptimizerTest . LinearProblem ( new double [ ] [ ] { new double [ ] { 10.0 , 7.0 , 8.1 , 7.2 } , new double [ ] { 7.08 , 5.04 , 6.0 , 5.0 } , new double [ ] { 8.0 , 5.98 , 9.89 , 9.0 } , new double [ ] { 6.99 , 4.99 , 9.0 , 9.98 } } , new double [ ] { 32 , 23 , 33 , 31 } ) ; RealPointValuePair optimum2 = optimizer . optimize ( problem2 , MINIMIZE , new double [ ] { 0 , 1 , 2 , 3 } ) ; Assert . assertEquals ( ( - 81.0 ) , optimum2 . getPoint ( ) [ 0 ] , 0.1 ) ; Assert . assertEquals ( 137.0 , optimum2 . getPoint ( ) [ 1 ] , 0.1 ) ; Assert . assertEquals ( ( - 34.0 ) , optimum2 . getPoint ( ) [ 2 ] , 0.1 ) ; Assert . assertEquals ( 22.0 , optimum2 . getPoint ( ) [ 3 ] , 0.1 ) ; } @ Test public void testMoreEstimatedParametersSimple ( ) { } @ Test public void testMoreEstimatedParametersUnsorted ( ) { } @ Test public void testRedundantEquations ( ) { } @ Test public void testInconsistentEquations ( ) { } @ Test public void testCircleFitting ( ) { } private static class LinearProblem implements Serializable , DifferentiableMultivariateRealFunction { private static final long serialVersionUID = 703247177355019415L ; final RealMatrix factors ; final double [ ] target ; public LinearProblem ( double [ ] [ ] factors , double [ ] target ) { } private double [ ] gradient ( double [ ] point ) { } public double value ( double [ ] variables ) { } public MultivariateVectorialFunction gradient ( ) { } public MultivariateRealFunction partialDerivative ( final int k ) { } } }

Fix:
optimizer . setMaxEvaluations ( 200 ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class BundleAccessesModuleServiceTestCase extends AbstractXServiceTestCase { private static final String TARGET_MODULE_NAME = "example-xservice-bam-target-module" ; private static final String CLIENT_BUNDLE_NAME = "example-xservice-bam-client-bundle" ; @ Inject public ServiceContainer serviceContainer ; @ ArquillianResource public Deployer deployer ; @ ArquillianResource BundleContext context ; @ Deployment public static JavaArchive createdeployment ( ) { final JavaArchive archive = ShrinkWrap . create ( JavaArchive . class , "xservice-module-access" ) ; archive . addClasses ( AbstractXServiceTestCase . class ) ; archive . setManifest ( new Asset ( ) { public InputStream openStream ( ) { OSGiManifestBuilder builder = OSGiManifestBuilder . newInstance ( ) ; builder . addBundleSymbolicName ( archive . getName ( ) ) ; builder . addBundleManifestVersion ( 2 ) ; <START_BUG> builder . addImportPackages ( Logger . class , Services . class , Module . class ) ; <END_BUG> return builder . openStream ( ) ; } } ) ; return archive ; } @ Test public void bundleInvokesModuleService ( ) throws Exception { } @ Deployment ( name = BundleAccessesModuleServiceTestCase . CLIENT_BUNDLE_NAME , managed = false , testable = false ) public static JavaArchive getClientBundleArchive ( ) { } @ Deployment ( name = BundleAccessesModuleServiceTestCase . TARGET_MODULE_NAME , managed = false , testable = false ) public static JavaArchive getTargetModuleArchive ( ) { } }

Fix:
builder . addImportPackages ( Logger . class , Services . class , Module . class , ServiceContainer . class ) ;
Buggy code:
public class DropDownChoice < T > extends AbstractSingleSelectChoice < T > implements IOnChangeListener { private static final long serialVersionUID = 1L ; public DropDownChoice ( MarkupContainer parent , final String id ) { } public DropDownChoice ( MarkupContainer parent , final String id , final List < T > choices ) { } public DropDownChoice ( MarkupContainer parent , final String id , final List < T > data , final IChoiceRenderer < T > renderer ) { } public DropDownChoice ( MarkupContainer parent , final String id , IModel < T > model , final List < T > choices ) { } public DropDownChoice ( MarkupContainer parent , final String id , IModel < T > model , final List < T > data , final IChoiceRenderer < T > renderer ) { } public DropDownChoice ( MarkupContainer parent , String id , IModel < List < T > > choices ) { } public DropDownChoice ( MarkupContainer parent , String id , IModel < T > model , IModel < List < T > > choices ) { } public DropDownChoice ( MarkupContainer parent , String id , IModel < List < T > > choices , IChoiceRenderer < T > renderer ) { } public DropDownChoice ( MarkupContainer parent , String id , IModel < T > model , IModel < List < T > > choices , IChoiceRenderer < T > renderer ) { } public final void onSelectionChanged ( ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "select" ) ; if ( wantOnSelectionChangedNotifications ( ) ) { final CharSequence url = urlFor ( INTERFACE ) ; Form form = DropDownChoice . findParent ( Form . class ) ; if ( form != null ) { tag . put ( "onchange" , form . getJsForInterfaceUrl ( url ) ) ; } else { <START_BUG> tag . put ( "onchange" , ( ( ( ( "location.href='" + url ) + "&" ) + ( DropDownChoice . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.options[this.selectedIndex].value;" ) ) ; <END_BUG> } } super . onComponentTag ( tag ) ; } protected void onSelectionChanged ( final Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } @ Override protected boolean getStatelessHint ( ) { } }

Fix:
tag . put ( "onchange" , ( ( ( ( "window.location.href='" + url ) + "&" ) + ( DropDownChoice . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.options[this.selectedIndex].value;" ) ) ;
Buggy code:
public class CERRunner { private String args ; public CERRunner ( ) { } public CERRunner ( String newArgs ) { } public void setArgs ( String newArgs ) { } private String getArgs ( ) { } public String run ( ) { } private String checkFullDataPath ( ) { } private String checkUpdate ( String realpath ) { String result = "" ; try { String propFilename = realpath + "LatestUpdatedDatetime.prop" ; RemoteLocalDatetimeChecker check = new RemoteLocalDatetimeChecker ( "http:////info.finance.naver.com//marketindex//exchangeMain.nhn" , propFilename ) ; DateTimeRound local = check . checkLatestUpdatedLocalDateandTime ( ) ; DateTimeRound remote = check . checkLatestNoticeDateandTime ( ) ; if ( ( remote . compareTo ( local ) ) > 0 ) { PropertyManager pm = new PropertyManager ( propFilename ) ; pm . loadProperties ( ) ; String date = Integer . toString ( remote . getCalendar ( ) . get ( GregorianCalendar . YEAR ) ) ; date += "." ; <START_BUG> date += Integer . toString ( remote . getCalendar ( ) . get ( GregorianCalendar . MONTH ) ) ; <END_BUG> date += "." ; date += Integer . toString ( remote . getCalendar ( ) . get ( GregorianCalendar . DAY_OF_MONTH ) ) ; date += "<seq2seq4repair_space>" ; date += Integer . toString ( remote . getCalendar ( ) . get ( GregorianCalendar . HOUR_OF_DAY ) ) ; date += ":" ; date += Integer . toString ( remote . getCalendar ( ) . get ( GregorianCalendar . MINUTE ) ) ; pm . setValue ( "date" , date ) ; String round = Integer . toString ( remote . getRoundVal ( ) ) ; while ( ( round . length ( ) ) < 3 ) round = "0" + round ; pm . setValue ( "round" , round ) ; pm . storeProperties ( ) ; CERTableUpdater updater = new CERTableUpdater ( "http:////info.finance.naver.com//marketindex//exchangeList.nhn" ) ; updater . update ( ) ; } } catch ( Exception e ) { result = e . getMessage ( ) ; return result ; } return result ; } }

Fix:
date += Integer . toString ( ( ( remote . getCalendar ( ) . get ( GregorianCalendar . MONTH ) ) + 1 ) ) ;
Buggy code:
public class WicketSessionFilter implements Filter { private static final Log log = LogFactory . getLog ( WicketSessionFilter . class ) ; private String servletPath ; private String sessionKey ; public WicketSessionFilter ( ) { } public void init ( FilterConfig filterConfig ) throws ServletException { servletPath = filterConfig . getInitParameter ( "servletPath" ) ; if ( ( servletPath ) == null ) { throw new ServletException ( ( "you<seq2seq4repair_space>must<seq2seq4repair_space>provide<seq2seq4repair_space>init<seq2seq4repair_space>parameter<seq2seq4repair_space>servlet-path<seq2seq4repair_space>if<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>use<seq2seq4repair_space>" + ( getClass ( ) . getName ( ) ) ) ) ; } if ( ( servletPath . charAt ( 0 ) ) != '//' ) { servletPath = '//' + ( servletPath ) ; } if ( WicketSessionFilter . log . isDebugEnabled ( ) ) { WicketSessionFilter . log . debug ( ( "servlet<seq2seq4repair_space>path<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>" + ( servletPath ) ) ) ; } <START_BUG> sessionKey = ( ( "wicket-" + ( servletPath ) ) + "-" ) + ( Session . SESSION_ATTRIBUTE_NAME ) ; <END_BUG> if ( WicketSessionFilter . log . isDebugEnabled ( ) ) { WicketSessionFilter . log . debug ( ( ( "will<seq2seq4repair_space>use<seq2seq4repair_space>" + ( sessionKey ) ) + "<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>session<seq2seq4repair_space>key<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>Wicket<seq2seq4repair_space>session" ) ) ; } } public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { } public void destroy ( ) { } }

Fix:
sessionKey = ( ( "wicket:" + ( servletPath ) ) + ":" ) + ( Session . SESSION_ATTRIBUTE_NAME ) ;
Buggy code:
public class OterWorkshop { private static Logger logger = Logger . getLogger ( OterWorkshop . class ) ; public static void loadProperties ( ) throws IOException { Properties prop = new Properties ( ) ; <START_BUG> prop . load ( ClassLoader . getSystemResourceAsStream ( PROPERTY_FILE ) ) ; <END_BUG> System . setProperty ( PROPERTY_ANDROID_HOME , prop . getProperty ( PROPERTY_ANDROID_HOME ) ) ; } public static File createTemporaryDirectory ( String prefix ) throws IOException { } public static File createDirectoryRecursive ( String directory ) throws IOException { } public static void unzipArchive ( File archive , File outputDir ) { } private static void unzipEntry ( ZipFile zipfile , ZipEntry entry , File outputDir ) throws IOException { } private static void createDir ( File dir ) { } public static void zipArchive ( File destArchive , File baseDirectory ) throws IOException { } private static void addDirToZip ( File baseDirectory , File directory , ZipOutputStream zipOutputStream ) throws IOException { } private static void addFileToZip ( String zipFilePath , String fullFilePath , ZipOutputStream zipOutputStream ) throws IOException { } public static String classPathToFilePath ( String clazz ) { } }

Fix:
prop . load ( new FileInputStream ( OterStatics . getConfigFileName ( ) ) ) ;
Buggy code:
public interface FinderMethods < T extends ActiveRecord > { public default Stream < T > find ( Condition condition ) { } public default T findFirst ( Condition condition ) { } public default Stream < T > findFor ( String column , Object value ) { } public default T findFirstFor ( String column , Object value ) { } public default Stream < T > findFor ( Map < String , Object > data ) { } public default T findFirstFor ( Map < String , Object > data ) { ArrayList < Condition > conds = new ArrayList < > ( data . size ( ) ) ; for ( Map . Entry < String , Object > e : data . entrySet ( ) ) { conds . add ( new de . doe300 . activerecord . dsl . SimpleCondition ( e . getKey ( ) , e . getValue ( ) , Comparison . IS ) ) ; } if ( ( conds . size ( ) ) == 1 ) { return findFirst ( conds . get ( 0 ) ) ; } <START_BUG> return findFirst ( new de . doe300 . activerecord . dsl . AndCondition ( new Condition [ conds . size ( ) ] ) ) ; <END_BUG> } public default Stream < T > findAll ( ) { } public Stream < T > findWithScope ( final Scope scope ) { } public T findFirstWithScope ( final Scope scope ) { } }

Fix:
return findFirst ( new de . doe300 . activerecord . dsl . AndCondition ( conds . toArray ( new Condition [ conds . size ( ) ] ) ) ) ;