nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FileOutputStreamProvider extends OutputStreamProvider { static final Logger LOG = LoggerFactory . getLogger ( FileOutputStreamProvider . class ) ; private static final int BUFFER_SIZE = 1024 * 64 ; private final Iterator < File > iterator ; private File current ; public FileOutputStreamProvider ( File file ) { } @ Override public void next ( ) throws IOException { } @ Override public String getCurrentPath ( ) { } @ Override public CountingOutputStream openStream ( ) throws IOException { FileOutputStreamProvider . LOG . debug ( "Opening<seq2seq4repair_space>file<seq2seq4repair_space>to<seq2seq4repair_space>write:<seq2seq4repair_space>{}" , current ) ; boolean succeed = false ; File parent = current . getParentFile ( ) ; if ( ( parent != null ) && ( ( parent . exists ( ) ) == false ) ) { FileOutputStreamProvider . LOG . debug ( "Parent<seq2seq4repair_space>directory<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist,<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>created:<seq2seq4repair_space>{}" , current ) ; <START_BUG> if ( ( parent . mkdirs ( ) ) == false ) { <END_BUG> throw new IOException ( MessageFormat . format ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>parent<seq2seq4repair_space>directory:<seq2seq4repair_space>{0}" , parent . getAbsolutePath ( ) ) ) ; } } FileOutputStream stream = new FileOutputStream ( current ) ; try { CountingOutputStream result = new CountingOutputStream ( new BufferedOutputStream ( stream , FileOutputStreamProvider . BUFFER_SIZE ) ) ; succeed = true ; return result ; } finally { if ( succeed == false ) { try { stream . close ( ) ; } catch ( IOException ignored ) { } } } } @ Override public void close ( ) { } }

Fix:
if ( ( ( parent . mkdirs ( ) ) == false ) && ( ( parent . isDirectory ( ) ) == false ) ) {
Buggy code:
public class WebResponse extends Response { private static final Log log = LogFactory . getLog ( WebResponse . class ) ; protected boolean redirect ; private final HttpServletResponse httpServletResponse ; public WebResponse ( ) { } public WebResponse ( final HttpServletResponse httpServletResponse ) throws IOException { } public void close ( ) { } public String encodeURL ( String url ) { } public final HttpServletResponse getHttpServletResponse ( ) { } public OutputStream getOutputStream ( ) { } public final boolean isRedirect ( ) { } public void redirect ( final String url ) { } public final void setContentType ( final String mimeType ) { } public void setContentLength ( long length ) { } public void setLastModifiedTime ( Time time ) { <START_BUG> if ( time != null ) { <END_BUG> httpServletResponse . setDateHeader ( "Expires" , ( ( System . currentTimeMillis ( ) ) + ( 3600 * 1000 ) ) ) ; httpServletResponse . setHeader ( "Cache-Control" , ( "max-age=" + 3600 ) ) ; httpServletResponse . setDateHeader ( "Last-Modified" , time . getMilliseconds ( ) ) ; } } public final void setLocale ( final Locale locale ) { } public void write ( final String string ) { } }

Fix:
if ( ( time != null ) && ( ( time . getMilliseconds ( ) ) != ( - 1 ) ) ) {
Buggy code:
public class BatchImageBuilder extends AbstractImageBuilder { protected BatchImageBuilder ( JavaBuilder javaBuilder ) { } public void build ( ) { } protected void addAllSourceFiles ( final ArrayList sourceFiles ) throws CoreException { } protected void cleanOutputFolders ( ) throws CoreException { } protected void copyExtraResourcesBack ( ClasspathMultiDirectory sourceLocation , final boolean deletedAll ) throws CoreException { notifier . subTask ( Util . bind ( "build.copyingResources" ) ) ; final int segmentCount = sourceLocation . sourceFolder . getFullPath ( ) . segmentCount ( ) ; final char [ ] [ ] exclusionPatterns = sourceLocation . exclusionPatterns ; final IContainer outputFolder = sourceLocation . binaryFolder ; sourceLocation . sourceFolder . accept ( new IResourceVisitor ( ) { public boolean visit ( IResource resource ) throws CoreException { switch ( resource . getType ( ) ) { case IResource . FILE : String extension = resource . getFileExtension ( ) ; if ( JAVA_EXTENSION . equalsIgnoreCase ( extension ) ) return false ; if ( CLASS_EXTENSION . equalsIgnoreCase ( extension ) ) return false ; if ( javaBuilder . filterExtraResource ( resource ) ) return false ; if ( ( exclusionPatterns != null ) && ( Util . isExcluded ( resource , exclusionPatterns ) ) ) return false ; IPath partialPath = resource . getFullPath ( ) . removeFirstSegments ( segmentCount ) ; IResource copiedResource = outputFolder . getFile ( partialPath ) ; if ( copiedResource . exists ( ) ) { if ( deletedAll ) { createErrorFor ( resource , Util . bind ( "build.duplicateResource" ) ) ; return false ; } copiedResource . delete ( IResource . FORCE , null ) ; } <START_BUG> resource . copy ( copiedResource . getFullPath ( ) , IResource . FORCE , null ) ; <END_BUG> copiedResource . setDerived ( true ) ; return false ; case IResource . FOLDER : if ( resource . equals ( outputFolder ) ) return false ; if ( javaBuilder . filterExtraResource ( resource ) ) return false ; if ( ( exclusionPatterns != null ) && ( Util . isExcluded ( resource , exclusionPatterns ) ) ) return false ; createFolder ( resource . getFullPath ( ) . removeFirstSegments ( segmentCount ) , outputFolder ) ; } return true ; } } ) ; } public String toString ( ) { } }

Fix:
resource . copy ( copiedResource . getFullPath ( ) , ( ( IResource . FORCE ) | ( DEEP ) ) , null ) ;
Buggy code:
public class SearchResultsCollection implements Serializable , Iterable < AbstractSearchResult > { private SearchedWord searchedWord ; private Map < Integer , AbstractSearchResult > results ; private int limit ; public SearchResultsCollection ( SearchedWord searchedWord , int limit ) { } public SearchedWord getSearchedWord ( ) { } public Map < Integer , AbstractSearchResult > getResults ( ) { } public int getLimit ( ) { } public SearchResultsCollection add ( AbstractSearchResult result ) { } public SearchResultsCollection add ( List < AbstractSearchResult > results ) { } private int getResultsCount ( ) { } @ Override public Iterator < AbstractSearchResult > iterator ( ) { } private class MyIterator implements Iterator { int current = 0 ; @ Override public boolean hasNext ( ) { <START_BUG> return ( getResultsCount ( ) ) == ( current ) ; <END_BUG> } @ Override public AbstractSearchResult next ( ) { } @ Override public void remove ( ) { } } public List < AbstractSearchResult > getAsList ( ) { } public void replaceLazyResultByLoadedResult ( AbstractSearchResult result ) throws InvalidArgumentException { } public void replaceLazyResultByLoadedResult ( List < AbstractSearchResult > result ) throws InvalidArgumentException { } }

Fix:
return ( getResultsCount ( ) ) > ( current ) ;
Buggy code:
public class Indexer extends Subsystem { private final SpeedController motor ; private final DigitalInput ballSwitch ; public Indexer ( ) { } public void initDefaultCommand ( ) { } public void driveMotor ( ) { } public void stop ( ) { } public boolean hasBall ( ) { <START_BUG> return ballSwitch . get ( ) ; <END_BUG> } }

Fix:
return ! ( ballSwitch . get ( ) ) ;
Buggy code:
final class EndpointConfigAdd extends AbstractAddStepHandler { static final EndpointConfigAdd INSTANCE = new EndpointConfigAdd ( ) ; private EndpointConfigAdd ( ) { } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { final ServerConfig config = PackageUtils . getServerConfig ( context ) ; if ( config != null ) { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; EndpointConfig endpointConfig = new EndpointConfig ( ) ; endpointConfig . setConfigName ( name ) ; config . addEndpointConfig ( endpointConfig ) ; if ( ! ( context . isBooting ( ) ) ) { <START_BUG> context . restartRequired ( ) ; <END_BUG> } } } }

Fix:
context . reloadRequired ( ) ;
Buggy code:
public class Goal { private int reward = 0 ; private Station origin ; private Station destination ; private int turnIssued ; private boolean complete = false ; private Train requiredTrain = null ; private boolean quantifiable = false ; private int turnLimit = 0 ; private boolean hasIslandStation ; public Goal ( Station origin , Station destination , int turnIssued ) { } public void addTrainConstraint ( Train train ) { } public void addTurnLimitConstraint ( int turns ) { } public void resetComplete ( ) { } public boolean isComplete ( Train train ) { if ( ! ( train . historyContains ( origin , turnIssued ) ) ) return false ; if ( ! ( train . historyContains ( destination , turnIssued ) ) ) return false ; int turnOriginWasVisited = train . getLastTurnStationWasVisited ( origin ) ; int turnDestinationWasVisited = train . getLastTurnStationWasVisited ( destination ) ; if ( turnOriginWasVisited > turnDestinationWasVisited ) return false ; if ( ( requiredTrain ) != null ) { <START_BUG> if ( ! ( train . equals ( requiredTrain ) ) ) <END_BUG> return false ; } return true ; } public String toString ( ) { } public void setComplete ( ) { } public boolean getComplete ( ) { } public void updateGoal ( ) { } private void setReward ( ) { } public boolean isExpired ( ) { } public int getMoney ( ) { } public Station getOrigin ( ) { } public Station getDestination ( ) { } public int getTurnLimit ( ) { } public void setHasIslandStation ( boolean hasIslandStation ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( train . getName ( ) . equals ( requiredTrain . getName ( ) ) ) )
Buggy code:
public class UpdateShardHandler { private static Logger log = LoggerFactory . getLogger ( UpdateShardHandler . class ) ; private ExecutorService updateExecutor = Executors . newCachedThreadPool ( new SolrjNamedThreadFactory ( "updateExecutor" ) ) ; private PoolingClientConnectionManager clientConnectionManager ; private final HttpClient client ; public UpdateShardHandler ( ConfigSolr cfg ) { } public HttpClient getHttpClient ( ) { } public ClientConnectionManager getConnectionManager ( ) { } public ExecutorService getUpdateExecutor ( ) { } public void close ( ) { try { ExecutorUtil . shutdownAndAwaitTermination ( updateExecutor ) ; <START_BUG> } catch ( Throwable e ) { <END_BUG> SolrException . log ( UpdateShardHandler . log , e ) ; } finally { clientConnectionManager . shutdown ( ) ; } } }

Fix:
} catch ( Exception e ) {
Buggy code:
public class UDPServer implements Runnable { private Controller controller ; private TransportAddress self ; private InetAddress address ; private int port ; public UDPServer ( Controller controller , InetAddress address , int port ) { } @ Override public void run ( ) { } private String [ ] split ( String str ) { } public Message parseMessage ( String message ) throws IOException { String [ ] parts = split ( message ) ; if ( parts [ 1 ] . equals ( "JOIN" ) ) { Node node = new Node ( parts [ 2 ] , Integer . parseInt ( parts [ 3 ] ) , null ) ; Node [ ] nodes = new Node [ ] { node } ; controller . addToIpTable ( nodes ) ; JoinAck ack = new JoinAck ( ) ; ack . setCode ( 0 ) ; return ack ; } else if ( parts [ 1 ] . equals ( "SER" ) ) { String filename = parts [ 6 ] ; List < String > matchingWords = controller . getMatchingWords ( filename ) ; TransportAddress src = new TransportAddress ( parts [ 2 ] , Integer . parseInt ( parts [ 3 ] ) ) ; int hops = Integer . parseInt ( parts [ ( ( parts . length ) - 1 ) ] ) ; if ( ( matchingWords . size ( ) ) > 0 ) { Communicator communicator = new Communicator ( ) ; communicator . responseFile ( src , self , matchingWords , hops , filename ) ; } else { String predIp = parts [ 4 ] ; int predPort = Integer . parseInt ( parts [ 5 ] ) ; TransportAddress pred = new TransportAddress ( predIp , predPort ) ; Set < TransportAddress > ipTable = controller . getIpTable ( ) ; List < TransportAddress > forwardingNodes = new ArrayList < TransportAddress > ( ) ; Iterator < TransportAddress > it = ipTable . iterator ( ) ; while ( it . hasNext ( ) ) { TransportAddress tp = it . next ( ) ; if ( ! ( tp . equals ( pred ) ) ) { forwardingNodes . add ( tp ) ; } } TransportAddress [ ] targets = new TransportAddress [ forwardingNodes . size ( ) ] ; targets = forwardingNodes . toArray ( targets ) ; Communicator communicator = new Communicator ( ) ; communicator . requestFile ( self , src , targets , filename , hops ) ; } } else if ( parts [ 1 ] . equals ( "SEROK" ) ) { String fileName = parts [ 6 ] ; if ( controller . searchTable . containsKey ( fileName ) ) { Long currentTime = System . currentTimeMillis ( ) ; Long latency = currentTime - ( controller . searchTable . get ( fileName ) ) ; controller . searchTable . remove ( fileName ) ; String [ ] fileList = new String [ ( parts . length ) - 7 ] ; System . arraycopy ( parts , 7 , fileList , 0 , fileList . length ) ; int hops = Integer . parseInt ( parts [ 5 ] ) ; TransportAddress src = new TransportAddress ( parts [ 3 ] , Integer . parseInt ( parts [ 4 ] ) ) ; Communicator communicator = new Communicator ( ) ; <START_BUG> communicator . publishResults ( self , src , fileName , latency , hops , fileList ) ; <END_BUG> } } return null ; } public DatagramSocket openSocket ( ) { } }

Fix:
communicator . publishResults ( self , src , fileName , latency , ( ( Controller . MAX_HOPS ) - hops ) , fileList ) ;
Buggy code:
public class CountyDialog { private MaterialDialog chooser ; public Context context ; private Set < String > keys = COUNTIES . keySet ( ) ; private String [ ] countyNames ; private String primaryCounty ; private HashSet < String > selectedCounties ; public static final int PRIMARY_COUNTY = 0 ; public static final int SECONDARY_COUNTIES = 1 ; private final String PRIMARY_TITLE = "Primary<seq2seq4repair_space>County" ; private final String SECONDARY_TITLE = "Additional<seq2seq4repair_space>Counties" ; private int prePrimaryIndex ; private Integer [ ] addCountyIndices ; private boolean selectionChanged = false ; private int type ; public CountyDialog ( Context ct , int type ) { } public void showDialog ( ) { } private void getPreviousSelections ( ) { } private MaterialDialog primaryBuilder ( ) { } private MaterialDialog secondaryBuilder ( ) { } private void addCounties ( Integer [ ] which , CharSequence [ ] text ) { } private void primarySelected ( ) { if ( selectionChanged ) { SharedPreferences settings = context . getSharedPreferences ( "MyPrefsFile" , 0 ) ; Set < String > addCounties = settings . getStringSet ( "counties" , null ) ; String [ ] additionCounties = addCounties . toArray ( new String [ addCounties . size ( ) ] ) ; <START_BUG> if ( ( additionCounties != null ) || ( ( additionCounties . length ) == 0 ) ) { <END_BUG> for ( int i = 0 ; i < ( additionCounties . length ) ; i ++ ) { String county = additionCounties [ i ] ; if ( county . equals ( primaryCounty ) ) { addCounties . remove ( county ) ; } } } SharedPreferences . Editor editor = settings . edit ( ) ; editor . putString ( "county" , primaryCounty ) ; editor . putStringSet ( "counties" , addCounties ) ; editor . apply ( ) ; } } public int getType ( ) { } private void multiSelected ( ) { } public void setNeutralDialog ( String name , final CountyDialog nDialog ) { } private HashSet < String > getCountyNames ( Integer [ ] index ) { } private int getCountyIndex ( String county ) { } private void removePrimary ( ) { } }

Fix:
if ( ( additionCounties != null ) || ( ( additionCounties . length ) != 0 ) ) {
Buggy code:
public class ChessBoard { ChessFactory factory = new ChessFactory ( ) ; private Chess [ ] [ ] ChessStatus = new Chess [ 20 ] [ 20 ] ; private short nowPlayer ; private int step ; private Rule rule ; public ChessBoard ( Rule rule ) { } private void initializeGame ( ) { } private void initializeChessBoard ( ) { } public short clickDot ( Location loc ) { } public short checkFinish ( ) { } public short checkToLose ( ) { <START_BUG> return this . rule . lose ( ChessStatus ) ; <END_BUG> } public void changePlayer ( ) { } public short getNowPlayer ( ) { } public void Surrender ( ) { } No newline ; at end ; of file ; }

Fix:
return this . rule . toLose ( ChessStatus ) ;
Buggy code:
class UriComponentTemplate extends UriTemplate { private final UriComponent uriComponent ; private boolean encodeUriVariableValues ; UriComponentTemplate ( String uriTemplate , UriComponent uriComponent , boolean encodeUriVariableValues ) { } @ Override protected String getVariableValueAsString ( Object variableValue ) { String variableValueString = super . getVariableValueAsString ( variableValue ) ; <START_BUG> return encodeUriVariableValues ? UriUtils . encode ( variableValueString , uriComponent , false ) : variableValueString ; <END_BUG> } }

Fix:
return encodeUriVariableValues ? UriUtils . encodeUriComponent ( variableValueString , uriComponent ) : variableValueString ;
Buggy code:
public class CountersTest extends TestBase { @ Test public void testWriteOneReadAll ( ) throws Exception { } protected class CounterGet extends RetryingAction < Long > { public CounterGet ( Cassandra . Client client , String cf , ByteBuffer key ) { } public void tryPerformAction ( ConsistencyLevel cl ) throws Exception { ByteBuffer bname = ByteBuffer . wrap ( name . getBytes ( ) ) ; ColumnPath cpath = new ColumnPath ( cf ) . setColumn ( bname ) ; <START_BUG> CounterColumn col = client . get_counter ( key , cpath , cl ) . column ; <END_BUG> Assert . assertEquals ( bname , col . name ) ; Assert . assertEquals ( value . longValue ( ) , col . value ) ; } } protected void add ( Cassandra . Client client , ByteBuffer key , String cf , String name , long value , ConsistencyLevel cl ) throws InvalidRequestException , TimedOutException , UnavailableException , TException { } }

Fix:
CounterColumn col = client . get ( key , cpath , cl ) . counter_column ;
Buggy code:
final class LineSegmentsFormatter { @ Nullable private final ListOfCallPoints listOfCallPoints ; @ NotNull private final StringBuilder formattedLine ; private int lineNumber ; private int segmentIndex ; private LineSegmentData segmentData ; @ Nullable private LineElement element ; LineSegmentsFormatter ( boolean withCallPoints , @ NotNull StringBuilder formattedLine ) { } void formatSegments ( @ NotNull LineParser lineParser , @ NotNull LineCoverageData lineData ) { lineNumber = lineParser . getNumber ( ) ; List < BranchCoverageData > branchData = lineData . getBranches ( ) ; int numSegments = lineData . getNumberOfSegments ( ) ; element = lineParser . getInitialElement ( ) . appendUntilNextCodeElement ( formattedLine ) ; segmentIndex = 0 ; segmentData = lineData ; appendUntilNextBranchingPoint ( ) ; while ( ( ( element ) != null ) && ( ( segmentIndex ) < numSegments ) ) { segmentData = ( ( segmentIndex ) == 0 ) ? lineData : branchData . get ( ( ( segmentIndex ) - 1 ) ) ; element = element . appendUntilNextCodeElement ( formattedLine ) ; appendUntilNextBranchingPoint ( ) ; } if ( ( element ) != null ) { element . appendAllBefore ( formattedLine , null ) ; } formattedLine . append ( "<//pre>" ) ; <START_BUG> if ( ( ( listOfCallPoints ) != null ) && ( lineData . containsCallPoints ( ) ) ) { <END_BUG> formattedLine . append ( listOfCallPoints . getContents ( ) ) ; } } private void appendUntilNextBranchingPoint ( ) { } private void appendToFormattedLine ( @ NotNull LineElement firstElement ) { } private void appendStartTag ( ) { } private void appendEndTag ( ) { } }

Fix:
if ( ( listOfCallPoints ) != null ) {
Buggy code:
public class WildcardBinding extends ReferenceBinding { ReferenceBinding genericType ; int rank ; public TypeBinding bound ; public TypeBinding [ ] otherBounds ; char [ ] genericSignature ; public int boundKind ; ReferenceBinding superclass ; ReferenceBinding [ ] superInterfaces ; TypeVariableBinding typeVariable ; LookupEnvironment environment ; public WildcardBinding ( ReferenceBinding genericType , int rank , TypeBinding bound , TypeBinding [ ] otherBounds , int boundKind , LookupEnvironment environment ) { } public int kind ( ) { } public boolean boundCheck ( TypeBinding argumentType ) { } public boolean canBeInstantiated ( ) { } public void collectSubstitutes ( Scope scope , TypeBinding otherType , Map substitutes , int constraint ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } public String debugName ( ) { } public TypeBinding erasure ( ) { } public char [ ] genericTypeSignature ( ) { } public int hashCode ( ) { } void initialize ( ReferenceBinding someGenericType , TypeBinding someBound , TypeBinding [ ] someOtherBounds ) { } public boolean isSuperclassOf ( ReferenceBinding otherType ) { } public boolean isUnboundWildcard ( ) { } public boolean isWildcard ( ) { } public char [ ] readableName ( ) { } ReferenceBinding resolve ( ) { } public char [ ] shortReadableName ( ) { } public char [ ] signature ( ) { } public char [ ] sourceName ( ) { } public ReferenceBinding superclass1 ( ) { } public ReferenceBinding superclass ( ) { } public ReferenceBinding [ ] superInterfaces1 ( ) { } public ReferenceBinding [ ] superInterfaces ( ) { } public void swapUnresolved ( UnresolvedReferenceBinding unresolvedType , ReferenceBinding resolvedType , LookupEnvironment env ) { boolean affected = false ; if ( ( this . genericType ) == unresolvedType ) { this . genericType = resolvedType ; affected = true ; } else if ( ( this . bound ) == unresolvedType ) { <START_BUG> this . bound = ( resolvedType . isGenericType ( ) ) ? env . createRawType ( resolvedType , resolvedType . enclosingType ( ) ) : resolvedType ; <END_BUG> affected = true ; } if ( affected ) initialize ( this . genericType , this . bound , this . otherBounds ) ; } public String toString ( ) { } public TypeVariableBinding typeVariable ( ) { } }

Fix:
this . bound = env . convertToRawType ( resolvedType ) ;
Buggy code:
public class HistoryActivity extends BaseActivity implements IHandleConnect { private static final int MAX_CONNECT_TIME = 3 ; @ InjectView ( id . history_bar ) Toolbar mToolbar ; @ InjectView ( id . btn_begin_check ) Button mBtnBeginCheck ; @ InjectView ( id . waiting_connect ) ProgressBar mWaitingConnect ; private Context mContext ; private int mCurrentConnectTime = 0 ; private BaseHistoryFragment mFragment ; private String mType ; private DeviceInfo mDeviceInfo ; private BluetoothLeService mBluetoothLeService ; private BleBroadcastReceiver mReceiver ; private ServiceConnection mServiceConnection = new ServiceConnection ( ) { @ Override public void onServiceDisconnected ( ComponentName name ) { } @ Override public void onServiceConnected ( ComponentName name , IBinder service ) { } } ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_history ) ; ButterKnife . inject ( this ) ; mContext = this ; mType = getIntent ( ) . getStringExtra ( INTENT_TYPE ) ; mDeviceInfo = getIntent ( ) . getParcelableExtra ( KEY_DEVICE_INFO ) ; <START_BUG> mFragment = TypeFactory . getHistoryFragment ( mType , mBluetoothLeService ) ; <END_BUG> getSupportFragmentManager ( ) . beginTransaction ( ) . add ( history_container , mFragment ) . commit ( ) ; mToolbar . setTitle ( TypeFactory . getTitleByType ( mContext , mType ) ) ; setSupportActionBar ( mToolbar ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; mToolbar . setNavigationIcon ( ic_action_previous_item ) ; Intent gattServiceIntent = new Intent ( this , BluetoothLeService . class ) ; bindService ( gattServiceIntent , mServiceConnection , BIND_AUTO_CREATE ) ; } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onDestroy ( ) { } private void beginCheckUI ( ) { } private void resetUI ( ) { } private void connectFailUI ( ) { } @ OnClick ( id . btn_begin_check ) public void beginCheck ( ) { } private void jumpToResult ( ) { } private void handleConFail ( ) { } private void connect ( ) { } @ Override public void handleConnect ( ) { } @ Override public void handleDisconnect ( ) { } @ Override public void handleGetData ( String data ) { } @ Override public void handleServiceDiscover ( ) { } }

Fix:
mFragment = TypeFactory . getHistoryFragment ( mType ) ;
Buggy code:
public class ReusableJettyApp { private Server server ; private final HttpServlet servlet ; public ReusableJettyApp ( Class < ? extends HttpServlet > servletClass ) { } public ReusableJettyApp ( HttpServlet servlet ) { } public void start ( int port , String resourceBase ) { server = new Server ( port ) ; try { HandlerList handlers = new HandlerList ( ) ; handlers . setHandlers ( new Handler [ ] { new ReusableJettyApp . StaticFilesHandler ( resourceBase ) , servletHandler ( ) , new DefaultHandler ( ) } ) ; server . setHandler ( handlers ) ; <START_BUG> server . doStart ( ) ; <END_BUG> } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } public void shutdown ( ) { } protected ServletHandler servletHandler ( ) { } private final class StaticFilesHandler extends ResourceHandler { private StaticFilesHandler ( String resourceBase ) { } @ Override public void handle ( String target , HttpServletRequest request , HttpServletResponse response , int dispatch ) throws ServletException , IOException { } private boolean welcomeExists ( ) throws IOException { } } }

Fix:
server . start ( ) ;
Buggy code:
public class Example2 extends AbstractSampler implements TestBean { private static final long serialVersionUID = 240L ; public SampleResult sample ( Entry e ) { SampleResult res = new SampleResult ( ) ; res . setSampleLabel ( getName ( ) ) ; res . setSamplerData ( myStringProperty ) ; res . sampleStart ( ) ; <START_BUG> res . setResponseData ( myStringProperty . toLowerCase ( ) . getBytes ( ) ) ; <END_BUG> res . setDataType ( TEXT ) ; res . sampleEnd ( ) ; res . setSuccessful ( true ) ; return res ; } private String myStringProperty ; public void setMyStringProperty ( String s ) { } public String getMyStringProperty ( ) { } }

Fix:
res . setResponseData ( myStringProperty . toLowerCase ( ) , null ) ;
Buggy code:
public class MessageDrivenComponentCreateService extends EJBComponentCreateService { private final Class < ? > messageListenerInterface ; private String resourceAdapterName ; private final Properties activationProps ; private final InjectedValue < PoolConfig > poolConfig = new InjectedValue < PoolConfig > ( ) ; private final InjectedValue < DefaultResourceAdapterService > defaultRANameService = new InjectedValue < DefaultResourceAdapterService > ( ) ; public MessageDrivenComponentCreateService ( final ComponentConfiguration componentConfiguration , final EjbJarConfiguration ejbJarConfiguration ) { } @ Override protected BasicComponent createComponent ( ) { } PoolConfig getPoolConfig ( ) { } public InjectedValue < PoolConfig > getPoolConfigInjector ( ) { } public InjectedValue < DefaultResourceAdapterService > getDefaultRANameServiceInjector ( ) { } String getDefaultResourceAdapterName ( ) { } private ClassLoader getDeploymentClassLoader ( ) { } private EndpointDeployer getEndpointDeployer ( ) { } private < S > ServiceController < S > getRequiredService ( final ServiceName serviceName , final Class < S > expectedType ) { } private ServiceRegistry getServiceRegistry ( ) { } ServiceName getResourceAdapterServiceName ( ) { <START_BUG> final Collection < ServiceName > serviceNames = ConnectorServices . getResourceAdapteServiceName ( this . resourceAdapterName ) ; <END_BUG> if ( ( serviceNames == null ) || ( serviceNames . isEmpty ( ) ) ) { throw new IllegalStateException ( ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>any<seq2seq4repair_space>resource<seq2seq4repair_space>adapter<seq2seq4repair_space>service<seq2seq4repair_space>for<seq2seq4repair_space>resource<seq2seq4repair_space>adapter<seq2seq4repair_space>" + ( this . resourceAdapterName ) ) ) ; } return serviceNames . iterator ( ) . next ( ) ; } private String stripDotRarSuffix ( final String raName ) { } }

Fix:
final Collection < ServiceName > serviceNames = ConnectorServices . getResourceAdapterServiceNames ( this . resourceAdapterName ) ;
Buggy code:
public class Scheduler { private static ZkConnector zkc ; static int boss ; private ArrayList < WorkerObject > workersList ; private ArrayList < JobObject > jobsList ; private Hashtable < String , Queue < JobObject > > jobQueue ; private ArrayList < String > knownJobIds ; Watcher schedulerWatcher ; Watcher workerWatcher ; Watcher jobpoolWatcher ; Watcher freeWorkerWatcher ; static String schedulerServerInfo ; static final String SCHEDULER_PATH = "//scheduler" ; static final String WORKER_PATH = "//worker" ; static final String FREE_WORKERS_PATH = "//freeWorkers" ; static final String JOBS_PATH = "//jobs" ; static final String JOBPOOL_PATH = "//jobpool" ; public Scheduler ( String hosts ) { } private void removeIfNoChildren ( String path ) { } private void removeFromJobList ( List < JobObject > remove ) { } private void attemptToAssignJobs ( ) { } private void assignJobs ( List < String > freeWorkerNodes ) { } private JobObject getJob ( String workerName ) { } private void doSchedule ( ) { } private void updateJobsList ( ) { } private void updateWorkersList ( ) { } private static synchronized Code createOnePersistentFolder ( String Path , String value ) { } private void createPersistentFolders ( ) { Scheduler . createOnePersistentFolder ( Scheduler . JOBS_PATH , null ) ; Scheduler . createOnePersistentFolder ( Scheduler . WORKER_PATH , null ) ; Scheduler . createOnePersistentFolder ( Scheduler . FREE_WORKERS_PATH , null ) ; <START_BUG> Scheduler . createOnePersistentFolder ( Scheduler . JOBPOOL_PATH , null ) ; <END_BUG> } private void tryToBeBoss ( ) { } public static void main ( String [ ] args ) { } }

Fix:
Scheduler . createOnePersistentFolder ( Scheduler . JOBPOOL_PATH , "1" ) ;
Buggy code:
public class Theory { private transient State beginState ; private transient State endState ; private transient Action action ; private int successNumber ; private int useNumber ; private int score = 0 ; public Theory ( ) { } public static List < Theory > getEquals ( Theory toCompare , Set < Theory > persistenTheories ) { } @ Override public boolean equals ( Object obj ) { } private boolean isSuccessful ( ) { } public static List < Theory > getSimilars ( Theory theory , Set < Theory > theories ) { } public void addBeginState ( State state ) { } public void incrementSucces ( ) { } public void incUses ( ) { } public void use ( Vision vision , ClientNaiveAgent client ) { if ( ( this . action ) != null ) { System . out . println ( "Accion<seq2seq4repair_space>conocida" ) ; this . action . convert ( ) ; } else { System . out . println ( "Accion<seq2seq4repair_space>Nueva" ) ; this . action = new Action ( ) ; this . action . initAction ( beginState , vision , client ) ; } this . action . exec ( beginState , vision , client ) ; <START_BUG> this . score = client . checkMyScore ( client . currentLevel ) ; <END_BUG> System . out . println ( ( "Score<seq2seq4repair_space>:<seq2seq4repair_space>" + ( score ) ) ) ; } public void addEndState ( State endState ) { } public int getSuccessNumber ( ) { } public void setSuccessNumber ( int successNumber ) { } public int getUseNumber ( ) { } public void setUseNumber ( int useNumber ) { } protected Boolean isEqual ( Theory theory ) { } public State getBeginState ( ) { } public State getEndState ( ) { } public Action getAction ( ) { } protected boolean isSimilar ( Theory theory ) { } @ Override public String toString ( ) { } public void variateAction ( ) { } public int getScore ( ) { } public void setScore ( int score ) { } }

Fix:
this . score = client . getCurrentScore ( ) ;
Buggy code:
public class Expand extends MatchingTask { private boolean overwrite = true ; private Vector patternsets = new Vector ( ) ; private Vector filesets = new Vector ( ) ; private File dest ; private File source ; public void setDest ( File d ) { } public void setOverwrite ( boolean b ) { } public void setSrc ( File s ) { } public void addFileset ( FileSet set ) { } public void addPatternset ( PatternSet set ) { } public void execute ( ) throws TaskException { } protected void expandFile ( FileUtils fileUtils , File srcF , File dir ) throws TaskException { } protected void extractFile ( FileUtils fileUtils , File srcF , File dir , InputStream compressedInputStream , String entryName , Date entryDate , boolean isDirectory ) throws IOException , TaskException { if ( ( ( patternsets ) != null ) && ( ( patternsets . size ( ) ) > 0 ) ) { String name = entryName ; boolean included = false ; for ( int v = 0 ; v < ( patternsets . size ( ) ) ; v ++ ) { PatternSet p = ( ( PatternSet ) ( patternsets . elementAt ( v ) ) ) ; String [ ] incls = p . getIncludePatterns ( project ) ; if ( incls != null ) { for ( int w = 0 ; w < ( incls . length ) ; w ++ ) { boolean isIncl = DirectoryScanner . match ( incls [ w ] , name ) ; if ( isIncl ) { included = true ; break ; } } } String [ ] excls = p . getExcludePatterns ( project ) ; if ( excls != null ) { for ( int w = 0 ; w < ( excls . length ) ; w ++ ) { boolean isExcl = DirectoryScanner . match ( excls [ w ] , name ) ; if ( isExcl ) { included = false ; break ; } } } } if ( ! included ) { return ; } } File f = fileUtils . resolveFile ( dir , entryName ) ; try { if ( ( ( ! ( overwrite ) ) && ( f . exists ( ) ) ) && ( ( f . lastModified ( ) ) >= ( entryDate . getTime ( ) ) ) ) { log ( ( ( "Skipping<seq2seq4repair_space>" + f ) + "<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>up-to-date" ) , MSG_DEBUG ) ; return ; } log ( ( ( ( "expanding<seq2seq4repair_space>" + entryName ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + f ) , MSG_VERBOSE ) ; File dirF = fileUtils . getParentFile ( f ) ; dirF . mkdirs ( ) ; if ( isDirectory ) { f . mkdirs ( ) ; } else { byte [ ] buffer = new byte [ 1024 ] ; int length = 0 ; FileOutputStream fos = null ; try { fos = new FileOutputStream ( f ) ; while ( ( length = compressedInputStream . read ( buffer ) ) >= 0 ) { fos . write ( buffer , 0 , length ) ; } fos . close ( ) ; fos = null ; } finally { if ( fos != null ) { try { fos . close ( ) ; } catch ( IOException e ) { } } } } <START_BUG> fileUtils . setFileLastModified ( f , entryDate . getTime ( ) ) ; <END_BUG> } catch ( FileNotFoundException ex ) { log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>expand<seq2seq4repair_space>to<seq2seq4repair_space>file<seq2seq4repair_space>" + ( f . getPath ( ) ) ) , MSG_WARN ) ; } } }

Fix:
f . setLastModified ( entryDate . getTime ( ) ) ;
Buggy code:
public class ScheduledThreadPoolMetricsHandler extends ThreadPoolMetricsHandler { public static final List < AttributeDefinition > METRICS = Arrays . asList ( ACTIVE_COUNT , COMPLETED_TASK_COUNT , CURRENT_THREAD_COUNT , LARGEST_THREAD_COUNT , TASK_COUNT , QUEUE_SIZE ) ; public ScheduledThreadPoolMetricsHandler ( final ServiceName serviceNameBase ) { } @ Override protected void setResult ( OperationContext context , final String attributeName , final Service < ? > service ) throws OperationFailedException { final ScheduledThreadPoolService pool = ( ( ScheduledThreadPoolService ) ( service ) ) ; if ( attributeName . equals ( CommonAttributes . ACTIVE_COUNT ) ) { context . getResult ( ) . set ( pool . getActiveCount ( ) ) ; } else if ( attributeName . equals ( CommonAttributes . COMPLETED_TASK_COUNT ) ) { context . getResult ( ) . set ( pool . getCompletedTaskCount ( ) ) ; } else if ( attributeName . equals ( CommonAttributes . CURRENT_THREAD_COUNT ) ) { context . getResult ( ) . set ( pool . getCurrentThreadCount ( ) ) ; } else if ( attributeName . equals ( CommonAttributes . LARGEST_THREAD_COUNT ) ) { context . getResult ( ) . set ( pool . getLargestThreadCount ( ) ) ; } else if ( attributeName . equals ( CommonAttributes . TASK_COUNT ) ) { context . getResult ( ) . set ( pool . getTaskCount ( ) ) ; } else if ( attributeName . equals ( CommonAttributes . QUEUE_SIZE ) ) { context . getResult ( ) . set ( pool . getQueueSize ( ) ) ; } else { <START_BUG> throw ROOT_LOGGER . unsupportedScheduledThreadPoolMetric ( attributeName ) ; <END_BUG> } } }

Fix:
throw MESSAGES . unsupportedScheduledThreadPoolMetric ( attributeName ) ;
Buggy code:
public class BlackFader extends Fader { public BlackFader ( ) { } @ Override public int [ ] fade ( int [ ] left , int [ ] right , int position ) { short leftBlue ; short leftGreen ; short leftRed ; short rightBlue ; short rightGreen ; short rightRed ; int [ ] mix = new int [ left . length ] ; float ratio = position // 1000.0F ; int col ; for ( int i = 0 ; i < ( left . length ) ; i ++ ) { col = left [ i ] ; leftRed = ( ( short ) ( ( col > > 16 ) & 255 ) ) ; leftGreen = ( ( short ) ( ( col > > 8 ) & 255 ) ) ; leftBlue = ( ( short ) ( col & 255 ) ) ; col = right [ i ] ; rightRed = ( ( short ) ( ( col > > 16 ) & 255 ) ) ; rightGreen = ( ( short ) ( ( col > > 8 ) & 255 ) ) ; rightBlue = ( ( short ) ( col & 255 ) ) ; if ( ratio < 0.5 ) { float newratio = 1 - ( ratio * 2 ) ; rightRed = ( ( short ) ( Math . round ( ( leftRed * newratio ) ) ) ) ; rightGreen = ( ( short ) ( Math . round ( ( leftGreen * newratio ) ) ) ) ; rightBlue = ( ( short ) ( Math . round ( ( leftBlue * newratio ) ) ) ) ; } else <START_BUG> if ( ratio > 0.5 ) { <END_BUG> float newratio = 1 - ( ( 1 - ratio ) * 2 ) ; rightRed = ( ( short ) ( Math . round ( ( rightRed * newratio ) ) ) ) ; rightGreen = ( ( short ) ( Math . round ( ( rightGreen * newratio ) ) ) ) ; rightBlue = ( ( short ) ( Math . round ( ( rightBlue * newratio ) ) ) ) ; } if ( rightRed > 255 ) { rightRed = 255 ; } if ( rightGreen > 255 ) { rightGreen = 255 ; } if ( rightBlue > 255 ) { rightBlue = 255 ; } mix [ i ] = ( ( rightRed << 16 ) | ( rightGreen << 8 ) ) | rightBlue ; } return mix ; } No newline ; at end ; of file ; }

Fix:
if ( ratio >= 0.5 ) {
Buggy code:
public class Functor { Object invokee ; String methodName ; Object [ ] args ; Class [ ] types ; Method methodToInvoke ; public Functor ( Object invokee , String methodName ) { } public Functor ( Object invokee , String methodName , Class [ ] types ) { } public Functor ( String methodName ) { } public Functor ( String methodName , Class [ ] types ) { } public Functor ( Object invokee , String methodName , Object [ ] args ) { } public Functor ( Object invokee , String methodName , Object [ ] args , Class [ ] types ) { } public Object invoke ( ) { try { return createMethod ( types ) . invoke ( invokee , getArgs ( ) ) ; } catch ( Exception e ) { <START_BUG> throw new RuntimeException ( e ) ; <END_BUG> } } public Object invoke ( Object invokee ) { } public Object invoke ( Object [ ] args ) { } public Object invoke ( Object invokee , Object [ ] args ) { } private Method createMethod ( Class [ ] types ) { } protected Class [ ] getNewArray ( int i , Class replacement , Class [ ] orig ) { } private Class [ ] getTypes ( ) { } private Object [ ] getArgs ( ) { } }

Fix:
throw new JMeterError ( e ) ;
Buggy code:
public class MainActivity extends ActionBarActivity { public static int INVALID_LOGIN_CREDENTIAL = 101 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; boolean creatingProfile = false ; ParseWSUser thisUser = new ParseWSUser ( ) ; TelephonyManager tMgr = ( ( TelephonyManager ) ( getApplicationContext ( ) . getSystemService ( TELEPHONY_SERVICE ) ) ) ; try { thisUser . logIn ( tMgr . getLine1Number ( ) , "password" ) ; <START_BUG> thisUser . fetchIfNeeded ( ) ; <END_BUG> } catch ( ParseException e ) { if ( ( e . getCode ( ) ) == ( MainActivity . INVALID_LOGIN_CREDENTIAL ) ) { Intent i = new Intent ( this , UserTypePickerActivity . class ) ; startActivity ( i ) ; creatingProfile = true ; } else { e . printStackTrace ( ) ; } } if ( ! creatingProfile ) { if ( thisUser . getIsSenior ( ) ) { Intent i = new Intent ( this , SeniorHomeActivity . class ) ; startActivity ( i ) ; } else { Intent i = new Intent ( this , FindTaskActivity . class ) ; startActivity ( i ) ; } } } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
thisUser = ( ( ParseWSUser ) ( ParseWSUser . getCurrentUser ( ) ) ) ;
Buggy code:
public class AutocompleteReservation { private static final int ONE_MINUTE = 60000 ; private static final int ONE_HOUR = 3600000 ; private static final int ONE_DAY = 86400000 ; public static void completeReservations ( ) { Runnable checkDates = ( ) -> { while ( ! ( Thread . interrupted ( ) ) ) { try { Reservation . checkReservationExpiration ( ) ; <START_BUG> Thread . sleep ( AutocompleteReservation . ONE_HOUR ) ; <END_BUG> } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } } ; new Thread ( checkDates ) . start ( ) ; } }

Fix:
Thread . sleep ( AutocompleteReservation . ONE_MINUTE ) ;
Buggy code:
public class SharedSDOEditor extends SDOEditor { private class UpdateConsumer implements IUpdateConsumer { public boolean consumeUpdate ( ISharedDataGraph graph , ID containerID ) { } public void updateFailed ( ISharedDataGraph graph , ID containerID , Throwable cause ) { } } private ISharedDataGraph sharedDataGraph ; public void init ( IEditorSite site , IEditorInput editorInput ) throws PartInitException { if ( editorInput instanceof IFileEditorInput ) try { EditorPlugin . getDefault ( ) . checkConnected ( ( ( IFileEditorInput ) ( editorInput ) ) . getFile ( ) . getProject ( ) ) ; } catch ( ECFException e ) { <START_BUG> throw new PartInitException ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>connecting<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>group." , e ) ; <END_BUG> } super . init ( site , editorInput ) ; } public void createModel ( ) { } public void doSave ( IProgressMonitor progressMonitor ) { } public void dispose ( ) { } }

Fix:
throw new PartInitException ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>connecting<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>group" , e ) ;
Buggy code:
public final class ImagePopupLink extends Link { public ImagePopupLink ( String name , IModel cdModel ) { } public void onClick ( ) { final CD cd = ( ( CD ) ( getModelObject ( ) ) ) ; ImageResource imgResource = new ImageResource ( ) { public IResource getResource ( ) { DynamicImageResource img = new DynamicImageResource ( ) { protected byte [ ] getImageData ( ) { return cd . getImage ( ) ; } } ; return img . getResource ( ) ; } } ; <START_BUG> getRequestCycle ( ) . setPage ( new ImagePopup ( imgResource ) ) ; <END_BUG> } protected boolean linksTo ( Page page ) { } }

Fix:
getRequestCycle ( ) . setResponsePage ( new ImagePopup ( imgResource ) ) ;
Buggy code:
public class Clearing implements Serializable { private static final long serialVersionUID = - 688806816964894689L ; public String type ; public Garrison dwelling = null ; public int location ; public int numberOfTreasures = 0 ; public Clearing [ ] connections ; public int nextConnection = 0 ; public Tile parent ; public Treasure [ ] treasures ; public Player [ ] occupants = new Player [ Config . MAX_CLIENTS ] ; public int nextOccupant = 0 ; Clearing ( int location , Tile parent ) { } public Player [ ] getOccupants ( ) { } public void moveIn ( Player p ) { } public void moveOut ( Player p ) { } public void addConnection ( Clearing toAdd ) { } public String getType ( ) { } public void setType ( String type ) { } public Garrison getDwelling ( ) { } public void setDwelling ( Garrison dwelling ) { } public int getClearingNumber ( ) { } public boolean canChangeClearing ( Clearing clearing ) { } public void addTreasures ( Treasure [ ] treasure ) { } public void removeTreasure ( Treasure treasure ) { } public Treasure [ ] getTreasures ( ) { } public int getNumberOfTreasures ( ) { } @ Override public String toString ( ) { System . out . println ( ( "<seq2seq4repair_space>Clearing<seq2seq4repair_space>#" + ( location ) ) ) ; if ( ( this . dwelling ) != null ) { System . out . println ( ( "<seq2seq4repair_space>-has<seq2seq4repair_space>garrison:<seq2seq4repair_space>" + ( dwelling . getName ( ) ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>" + ( dwelling ) ) ) ; } for ( int i = 0 ; i < ( occupants . length ) ; i ++ ) { <START_BUG> if ( ( connections [ i ] ) != null ) { <END_BUG> System . out . println ( ( "<seq2seq4repair_space>-contains<seq2seq4repair_space>Player<seq2seq4repair_space>" + ( occupants [ i ] . getID ( ) ) ) ) ; } } for ( int i = 0 ; i < ( connections . length ) ; i ++ ) { if ( ( connections [ i ] ) != null ) { System . out . println ( ( ( ( "<seq2seq4repair_space>-connected<seq2seq4repair_space>to<seq2seq4repair_space>" + ( connections [ i ] . parent . getName ( ) ) ) + "<seq2seq4repair_space>clearing<seq2seq4repair_space>#" ) + ( connections [ i ] . location ) ) ) ; } } return "" ; } }

Fix:
if ( ( occupants [ i ] ) != null ) {
Buggy code:
public class SearchContact extends HttpServlet { private static final long serialVersionUID = 1L ; public SearchContact ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { System . out . println ( "SContact::doPost<seq2seq4repair_space>1" ) ; Integer id = Integer . parseInt ( request . getParameter ( "contactID" ) ) ; ApplicationContext ac = WebApplicationContextUtils . getWebApplicationContext ( getServletContext ( ) ) ; <START_BUG> IDAOContact daoContact = ( ( IDAOContact ) ( ac . getBean ( "daocontact" ) ) ) ; <END_BUG> String dbOutput = daoContact . searchContact ( id ) ; String responseUrl = ( "//" + "accueil.jsp" ) + ( ServerUtils . getNewParameter ( "dbOutputRaw" , dbOutput ) ) ; System . out . println ( ( "::doPost<seq2seq4repair_space>responseUrl=" + responseUrl ) ) ; RequestDispatcher rd = getServletContext ( ) . getRequestDispatcher ( responseUrl ) ; rd . forward ( request , response ) ; } }

Fix:
IDAOContact daoContact = ( ( IDAOContact ) ( ac . getBean ( "daoContactProperty" ) ) ) ;
Buggy code:
public final class WicketParamTagHandler extends AbstractMarkupFilter { private static final Log log = LogFactory . getLog ( WicketParamTagHandler . class ) ; private ComponentTag componentTag ; private ComponentTag lastTag ; private IXmlPullParser xmlParser ; private boolean stripWicketTag = true ; public WicketParamTagHandler ( final IMarkupFilter parent ) { } public void setStripWicketTag ( final boolean strip ) { } public final MarkupElement nextTag ( ) throws ParseException { } private ComponentTag handleNext ( ComponentTag tag ) throws ParseException { if ( tag . isClose ( ) ) { return tag ; } <START_BUG> if ( ( tag . getComponentName ( ) ) == null ) { <END_BUG> componentTag = null ; return tag ; } if ( ( ! ( tag instanceof ComponentWicketTag ) ) || ( ! ( ( ( ComponentWicketTag ) ( tag ) ) . isParamTag ( ) ) ) ) { componentTag = tag ; return tag ; } final CharSequence rawMarkup = xmlParser . getInputSubsequence ( ( ( lastTag . getPos ( ) ) + ( lastTag . getLength ( ) ) ) , tag . getPos ( ) ) ; if ( ( rawMarkup . length ( ) ) > 0 ) { String text = rawMarkup . toString ( ) ; text = text . replaceAll ( "[\\r\\n]+" , "" ) . trim ( ) ; if ( ( text . length ( ) ) > 0 ) { throw new MarkupException ( ( "There<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>any<seq2seq4repair_space>text<seq2seq4repair_space>between<seq2seq4repair_space>a<seq2seq4repair_space>component<seq2seq4repair_space>tag<seq2seq4repair_space>and<seq2seq4repair_space>" + "it's<seq2seq4repair_space>related<seq2seq4repair_space>param<seq2seq4repair_space>tag.<seq2seq4repair_space>Only<seq2seq4repair_space>spaces<seq2seq4repair_space>and<seq2seq4repair_space>line<seq2seq4repair_space>breaks<seq2seq4repair_space>are<seq2seq4repair_space>allowed." ) ) ; } } lastTag . putAll ( tag . getAttributes ( ) ) ; if ( ( stripWicketTag ) == true ) { tag = ( ( ComponentTag ) ( getParent ( ) . nextTag ( ) ) ) ; } else { WicketParamTagHandler . log . debug ( "Be<seq2seq4repair_space>careful.<seq2seq4repair_space>Not<seq2seq4repair_space>stripping<seq2seq4repair_space><wicket:param><seq2seq4repair_space>may<seq2seq4repair_space>cause<seq2seq4repair_space>subtle<seq2seq4repair_space>errors." ) ; } return tag ; } }

Fix:
if ( ( tag . getComponentId ( ) ) == null ) {