nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SecretFileManager extends JFrame { private ConfigFileManager cfgFileManager ; private String secretFilePath ; FileManager fm ; public SecretFileManager ( ) { } public boolean secretFileExists ( ) { File file = new File ( getSecretFilePath ( ) ) ; <START_BUG> if ( ( file . length ( ) ) == 0 ) { <END_BUG> fm . rewriteFile ( file , "" ) ; } return file . exists ( ) ; } public String getSecretFilePath ( ) { } public File getSecretFile ( ) { } public List < String > getAllNames ( ) { } public String getPasswd ( String name ) { } public void changeValue ( String name , String newvalue , int value ) { } public void removepasswd ( String name ) { } public void rewriteSecretFile ( String content ) { } public void addNewName ( String name ) { } public void addNewPasswd ( String passwd ) { } }

Fix:
if ( ( file . exists ( ) ) && ( ( file . length ( ) ) == 0 ) ) {
Buggy code:
public final class RequiredValidator extends AbstractValidator { public ValidationErrorMessage validate ( final FormComponent component ) { <START_BUG> final String value = component . getStringValue ( ) ; <END_BUG> if ( ( value == null ) || ( value . trim ( ) . equals ( "" ) ) ) { return errorMessage ( value , component ) ; } return NO_ERROR ; } public String toString ( ) { } }

Fix:
final String value = component . getRequestString ( ) ;
Buggy code:
public class ConstraintUpdateManager extends AbstractUpdateManager { private static final Localizer _loc = Localizer . forPackage ( ConstraintUpdateManager . class ) ; public boolean orderDirty ( ) { <START_BUG> return true ; <END_BUG> } protected PreparedStatementManager newPreparedStatementManager ( JDBCStore store , Connection conn ) { } protected RowManager newRowManager ( ) { } protected Collection flush ( RowManager rowMgr , PreparedStatementManager psMgr , Collection exceps ) { } private void analyzeForeignKeys ( Collection inserts , Collection updates , Collection deletes , RowManagerImpl rowMgr , Graph [ ] graphs ) { } private Row getInsertRow ( Map insertMap , RowManagerImpl rowMgr , Row row ) { } private Graph analyzeAgainstInserts ( Collection rows , RowManagerImpl rowMgr , Graph graph ) { } private static Table getBaseTable ( OpenJPAStateManager sm ) { } private Graph addEdge ( Graph graph , PrimaryRow row1 , PrimaryRow row2 , Object fk ) { } protected void flushGraph ( Graph graph , PreparedStatementManager psMgr , boolean autoAssign ) throws SQLException { } protected void flush ( Collection deleteUpdates , Collection nodes , PreparedStatementManager psMgr ) { } private void addDeleteUpdate ( Edge edge , Collection deleteUpdates ) throws SQLException { } private void addInsertUpdate ( PrimaryRow row , Edge edge , Collection insertUpdates ) throws SQLException { } private Edge findBreakableLink ( List cycle ) { } private DepthFirstAnalysis recalculateDepthFirstAnalysis ( Graph graph , boolean autoAssign ) { } private boolean resolveCycles ( Graph graph , Collection edges , Collection deleteUpdates , Collection insertUpdates ) throws SQLException { } protected DepthFirstAnalysis newDepthFirstAnalysis ( Graph graph , boolean autoAssign ) { } protected void flush ( Collection rows , PreparedStatementManager psMgr ) { } }

Fix:
return false ;
Buggy code:
public class CubicChunkLoader implements IChunkLoader , IThreadedFileIO { private static final Logger log = LogManager . getLogger ( ) ; private static class SaveEntry { private long address ; private NBTTagCompound nbt ; public SaveEntry ( long address , NBTTagCompound nbt ) { } } private DB m_db ; private ConcurrentNavigableMap < Long , byte [ ] > m_columns ; private ConcurrentNavigableMap < Long , byte [ ] > m_cubicChunks ; private ConcurrentBatchedQueue < CubicChunkLoader . SaveEntry > m_columnsToSave ; private ConcurrentBatchedQueue < CubicChunkLoader . SaveEntry > m_cubicChunksToSave ; public CubicChunkLoader ( ISaveHandler saveHandler ) { } @ Override public Column loadChunk ( World world , int x , int z ) throws IOException { Column column = loadColumn ( world , AddressTools . getAddress ( world . provider . dimensionId , x , 0 , z ) ) ; if ( column == null ) { return null ; } <START_BUG> for ( int y = 0 ; y < 15 ; y ++ ) { <END_BUG> CubicChunk cubicChunk = loadCubicChunk ( world , column , AddressTools . getAddress ( world . provider . dimensionId , x , y , z ) ) ; if ( cubicChunk == null ) { continue ; } } return column ; } private Column loadColumn ( World world , long address ) throws IOException { } private CubicChunk loadCubicChunk ( World world , Column column , long address ) throws IOException { } @ Override public void saveChunk ( World world , Chunk mcChunk ) throws IOException , MinecraftException { } @ Override public boolean writeNextIO ( ) { } private byte [ ] writeNbtBytes ( NBTTagCompound nbt ) throws IOException { } @ Override public void saveExtraData ( ) { } @ Override public void chunkTick ( ) { } @ Override public void saveExtraChunkData ( World world , Chunk chunk ) { } private Column castColumn ( Chunk mcChunk ) { } private NBTTagCompound writeColumnToNbt ( Column column ) { } private Column readColumnFromNBT ( World world , int x , int z , NBTTagCompound nbt ) { } private NBTTagCompound writeCubicChunkToNbt ( CubicChunk cubicChunk ) { } private CubicChunk readCubicChunkFromNbt ( World world , Column column , int x , int y , int z , NBTTagCompound nbt ) { } private List < NextTickListEntry > getScheduledTicks ( CubicChunk cubicChunk ) { } private void copyScheduledTicks ( ArrayList < NextTickListEntry > out , Collection < NextTickListEntry > scheduledTicks , CubicChunk cubicChunk ) { } }

Fix:
for ( int y = 0 ; y < 16 ; y ++ ) {
Buggy code:
public class GameBoardSceneChangeHandler implements ISceneChangeHandler { private Scene mScene ; @ Override public void setScene ( Scene scene ) { } @ Override public void onViewportChanged ( int width , int height ) { } @ Override public void preSceneDraw ( ) { final float eyeX = 0.0F ; final float eyeY = 0.0F ; final float eyeZ = 1.5F ; final float lookX = 0.0F ; final float lookY = 0.0F ; final float lookZ = - 5.0F ; final float upX = 0.0F ; final float upY = 1.0F ; final float upZ = 0.0F ; <START_BUG> mScene . setLookAt ( eyeX , ( eyeY + 1.0F ) , ( eyeZ + 110.0F ) , lookX , lookY , ( lookZ - 10.0F ) , upX , upY , upZ ) ; <END_BUG> } }

Fix:
mScene . setLookAt ( eyeX , ( eyeY + 5.0F ) , ( eyeZ + 15.0F ) , lookX , lookY , ( lookZ - 10.0F ) , upX , upY , upZ ) ;
Buggy code:
public abstract class AbstractMultipleLinearRegression implements MultipleLinearRegression { private RealMatrix xMatrix ; private RealVector yVector ; private boolean noIntercept = false ; protected RealMatrix getX ( ) { } protected RealVector getY ( ) { } public boolean isNoIntercept ( ) { } public void setNoIntercept ( boolean noIntercept ) { } public void newSampleData ( double [ ] data , int nobs , int nvars ) { } protected void newYSampleData ( double [ ] y ) { } protected void newXSampleData ( double [ ] [ ] x ) { } protected void validateSampleData ( double [ ] [ ] x , double [ ] y ) throws MathIllegalArgumentException { } protected void validateCovarianceData ( double [ ] [ ] x , double [ ] [ ] covariance ) { } public double [ ] estimateRegressionParameters ( ) { } public double [ ] estimateResiduals ( ) { } public double [ ] [ ] estimateRegressionParametersVariance ( ) { } public double [ ] estimateRegressionParametersStandardErrors ( ) { } public double estimateRegressandVariance ( ) { } public double estimateErrorVariance ( ) { } public double estimateRegressionStandardError ( ) { <START_BUG> return Math . sqrt ( estimateErrorVariance ( ) ) ; <END_BUG> } protected abstract RealVector calculateBeta ( ) { } protected abstract RealMatrix calculateBetaVariance ( ) { } protected double calculateYVariance ( ) { } protected double calculateErrorVariance ( ) { } protected RealVector calculateResiduals ( ) { } }

Fix:
return FastMath . sqrt ( estimateErrorVariance ( ) ) ;
Buggy code:
public class MyCLIView extends Observable implements MyView { private CLI cli ; public MyCLIView ( CLI cli ) { } @ Override public void start ( ) { <START_BUG> new Thread ( cli ) . start ( ) ; <END_BUG> } @ Override public void printString ( String string ) { } public void inputToPresenter ( String line ) { } }

Fix:
cli . start ( ) ;
Buggy code:
public class DomesticTradeController extends Controller implements IDomesticTradeController , Observer { private IDomesticTradeOverlay tradeOverlay ; private IWaitView waitOverlay ; private IAcceptTradeOverlay acceptOverlay ; private boolean firstRun ; private TradeOfferState offerState ; private AcceptTradeState acceptState ; public DomesticTradeController ( IDomesticTradeView tradeView , IDomesticTradeOverlay tradeOverlay , IWaitView waitOverlay , IAcceptTradeOverlay acceptOverlay ) { } public IDomesticTradeView getTradeView ( ) { } public IDomesticTradeOverlay getTradeOverlay ( ) { } public void setTradeOverlay ( IDomesticTradeOverlay tradeOverlay ) { } public IWaitView getWaitOverlay ( ) { } public void setWaitOverlay ( IWaitView waitView ) { } public IAcceptTradeOverlay getAcceptOverlay ( ) { } public void setAcceptOverlay ( IAcceptTradeOverlay acceptOverlay ) { } @ Override public void startTrade ( ) { } @ Override public void decreaseResourceAmount ( ResourceType resource ) { } @ Override public void increaseResourceAmount ( ResourceType resource ) { } @ Override public void sendTradeOffer ( ) { } @ Override public void setPlayerToTradeWith ( int playerIndex ) { } @ Override public void setResourceToReceive ( ResourceType resource ) { } @ Override public void setResourceToSend ( ResourceType resource ) { } @ Override public void unsetResource ( ResourceType resource ) { } @ Override public void cancelTrade ( ) { } @ Override public void acceptTrade ( boolean willAccept ) { } @ Override public void update ( Observable arg0 , Object arg1 ) { TradeOffer offer = ModelFacade . getInstance ( ) . getGame ( ) . getTradeOffer ( ) ; int index = ModelFacade . getInstance ( ) . getPlayerInfo ( ) . getPlayerIndex ( ) ; if ( offer == null ) { if ( getWaitOverlay ( ) . isModalShowing ( ) ) getWaitOverlay ( ) . closeModal ( ) ; } else if ( ( offer . getSender ( ) ) == index ) { if ( ! ( getWaitOverlay ( ) . isModalShowing ( ) ) ) { getWaitOverlay ( ) . setMessage ( "Waiting<seq2seq4repair_space>for<seq2seq4repair_space>recipient<seq2seq4repair_space>response." ) ; getWaitOverlay ( ) . showModal ( ) ; } } else <START_BUG> if ( ( offer . getReciever ( ) ) == index ) { <END_BUG> System . out . println ( ( "===========OFFER<seq2seq4repair_space>FROM:<seq2seq4repair_space>" + ( offer . getSenderName ( ) ) ) ) ; boolean canAccept = ModelFacade . getInstance ( ) . canAcceptTrade ( ) ; acceptState = new AcceptTradeState ( this ) ; acceptState . updateOverlay ( canAccept ) ; } } }

Fix:
if ( ( offer . getReceiver ( ) ) == index ) {
Buggy code:
public class MainConsole { static UserController userController ; static JobController jobController ; static User currentUser ; public static void main ( String [ ] args ) { MainConsole . userController = new UserController ( ) ; MainConsole . userController . readUserFile ( "//testFile.csv" ) ; <START_BUG> MainConsole . jobController = new JobController ( ) ; <END_BUG> MainConsole . displayDoc ( ) ; MainConsole . displayLoginPrompt ( ) ; boolean emailIsVerified = false ; while ( ! emailIsVerified ) { emailIsVerified = MainConsole . verifyEmail ( MainConsole . retrieveEmail ( ) ) ; } MainConsole . displayRoleOptions ( MainConsole . currentUser ) ; MainConsole . exitSystem ( ) ; } private static void displayDoc ( ) { } private static void displayLoginPrompt ( ) { } private static String retrieveEmail ( ) { } private static boolean verifyEmail ( final String email ) { } private static void displayRoleOptions ( final User user ) { } private static void exitSystem ( ) { } }

Fix:
MainConsole . jobController = new JobController ( "src//jobFile.txt" ) ;
Buggy code:
public class Image extends WebComponent implements IResourceListener { private static final long serialVersionUID = 1L ; private final LocalizedImageResource localizedImageResource = new LocalizedImageResource ( this ) ; protected Image ( final String id ) { } public Image ( final String id , final ResourceReference resourceReference ) { } public Image ( final String id , final ResourceReference resourceReference , PageParameters resourceParameters ) { } public Image ( final String id , final IResource imageResource ) { } public Image ( final String id , final IModel < ? > model ) { } public Image ( final String id , final String string ) { } public void onResourceRequested ( ) { } public void setImageResource ( final IResource imageResource ) { } public void setImageResourceReference ( final ResourceReference resourceReference ) { } public void setImageResourceReference ( final ResourceReference resourceReference , final PageParameters parameters ) { } @ Override public Component setDefaultModel ( IModel < ? > model ) { } protected IResource getImageResource ( ) { } protected ResourceReference getImageResourceReference ( ) { } @ Override protected IModel < ? > initModel ( ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { } protected final void addAntiCacheParameter ( final ComponentTag tag ) { String url = tag . getAttributes ( ) . getString ( "src" ) ; <START_BUG> url = url + ( ( url . indexOf ( "?" ) ) >= 0 ? "&amp;" : "?" ) ; <END_BUG> url = ( url + "wicket:antiCache=" ) + ( System . currentTimeMillis ( ) ) ; tag . put ( "src" , url ) ; } @ Override protected boolean getStatelessHint ( ) { } @ Override protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } }

Fix:
url = url + ( url . contains ( "?" ) ? "&amp;" : "?" ) ;
Buggy code:
public interface Factory extends Remote { <START_BUG> CityImpl getCity ( String name ) throws RemoteException ; <END_BUG> No newline ; at end ; of file ; }

Fix:
public City getCity ( String name ) throws RemoteException ;
Buggy code:
public class BatchCubingJobBuilder2 extends JobBuilderSupport { private static final Logger logger = LoggerFactory . getLogger ( BatchCubingJobBuilder2 . class ) ; private final IMRBatchCubingInputSide inputSide ; private final IMRBatchCubingOutputSide2 outputSide ; public BatchCubingJobBuilder2 ( CubeSegment newSegment , String submitter ) { } public CubingJob build ( ) { } private void addLayerCubingSteps ( final CubingJob result , final String jobId , final String cuboidRootPath ) { RowKeyDesc rowKeyDesc = ( ( CubeSegment ) ( seg ) ) . getCubeDesc ( ) . getRowkey ( ) ; <START_BUG> final int groupRowkeyColumnsCount = ( ( CubeSegment ) ( seg ) ) . getCubeDesc ( ) . getBuildLevel ( ) ; <END_BUG> final int totalRowkeyColumnsCount = rowKeyDesc . getRowKeyColumns ( ) . length ; final String [ ] cuboidOutputTempPath = getCuboidOutputPaths ( cuboidRootPath , totalRowkeyColumnsCount , groupRowkeyColumnsCount ) ; result . addTask ( createBaseCuboidStep ( cuboidOutputTempPath , jobId ) ) ; for ( int i = 1 ; i <= groupRowkeyColumnsCount ; i ++ ) { int dimNum = totalRowkeyColumnsCount - i ; result . addTask ( createNDimensionCuboidStep ( cuboidOutputTempPath , dimNum , totalRowkeyColumnsCount , jobId ) ) ; } } private SaveStatisticsStep createSaveStatisticsStep ( String jobId ) { } private MapReduceExecutable createInMemCubingStep ( String jobId , String cuboidRootPath ) { } private MapReduceExecutable createBaseCuboidStep ( String [ ] cuboidOutputTempPath , String jobId ) { } private MapReduceExecutable createNDimensionCuboidStep ( String [ ] cuboidOutputTempPath , int dimNum , int totalRowkeyColumnCount , String jobId ) { } private String [ ] getCuboidOutputPaths ( String cuboidRootPath , int totalRowkeyColumnCount , int groupRowkeyColumnsCount ) { } }

Fix:
final int groupRowkeyColumnsCount = rowKeyDesc . getNCuboidBuildLevels ( ) ;
Buggy code:
public class MessageDrivenComponent extends EJBComponent implements PooledComponent < MessageDrivenComponentInstance > { private final Pool < MessageDrivenComponentInstance > pool ; private final String poolName ; private final ActivationSpec activationSpec ; private final MessageEndpointFactory endpointFactory ; private final Class < ? > messageListenerInterface ; private final ClassLoader classLoader ; private ResourceAdapter resourceAdapter ; private Endpoint endpoint ; protected MessageDrivenComponent ( final MessageDrivenComponentCreateService ejbComponentCreateService , final Class < ? > messageListenerInterface , final ActivationSpec activationSpec ) { } @ Override protected BasicComponentInstance instantiateComponentInstance ( AtomicReference < ManagedReference > instanceReference , Interceptor preDestroyInterceptor , Map < Method , Interceptor > methodInterceptors , final InterceptorFactoryContext interceptorContext ) { } @ Override public Pool < MessageDrivenComponentInstance > getPool ( ) { } @ Override public String getPoolName ( ) { } protected void setResourceAdapter ( ResourceAdapter resourceAdapter ) { } void setEndpoint ( final Endpoint endpoint ) { } @ Override public void start ( ) { } @ Override public void stop ( ) { } @ Override public AllowedMethodsInformation getAllowedMethodsInformation ( ) { <START_BUG> return MessageDrivenAllowedMethodsInformation . INSTANCE ; <END_BUG> } }

Fix:
return isBeanManagedTransaction ( ) ? MessageDrivenAllowedMethodsInformation . INSTANCE_BMT : MessageDrivenAllowedMethodsInformation . INSTANCE_CMT ;
Buggy code:
public class DeflateCompressor implements ICompressor { public static final DeflateCompressor instance = new DeflateCompressor ( ) ; private final ThreadLocal < Deflater > deflater ; private final ThreadLocal < Inflater > inflater ; public static DeflateCompressor create ( Map < String , String > compressionOptions ) { } private DeflateCompressor ( ) { } public int initialCompressedBufferLength ( int chunkLength ) { } public int compress ( byte [ ] input , int inputOffset , int inputLength , ICompressor . WrappedArray output , int outputOffset ) throws IOException { Deflater def = deflater . get ( ) ; def . reset ( ) ; def . setInput ( input , inputOffset , inputLength ) ; def . finish ( ) ; if ( def . needsInput ( ) ) return 0 ; int offs = outputOffset ; while ( true ) { offs += def . deflate ( output . buffer , offs , ( ( output . buffer . length ) - offs ) ) ; <START_BUG> if ( def . needsInput ( ) ) { <END_BUG> return offs - outputOffset ; } else { byte [ ] newBuffer = new byte [ ( ( ( output . buffer . length ) * 4 ) // 3 ) + 1 ] ; System . arraycopy ( output . buffer , 0 , newBuffer , 0 , offs ) ; output . buffer = newBuffer ; } } } public int uncompress ( byte [ ] input , int inputOffset , int inputLength , byte [ ] output , int outputOffset ) throws IOException { } }

Fix:
if ( def . finished ( ) ) {
Buggy code:
final class ClientThread extends Thread { NetworkServerControlImpl parent ; ServerSocket serverSocket ; private int timeSlice ; private int connNum ; ClientThread ( NetworkServerControlImpl nsi , ServerSocket ss ) { } public void run ( ) { Socket clientSocket = null ; for ( ; ; ) { try { try { try { clientSocket = ( ( Socket ) ( AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws IOException { return serverSocket . accept ( ) ; } } ) ) ) ; clientSocket . setKeepAlive ( parent . getKeepAlive ( ) ) ; <START_BUG> if ( ( timeSlice ) != 0 ) <END_BUG> clientSocket . setSoTimeout ( timeSlice ) ; parent . addSession ( clientSocket ) ; } catch ( PrivilegedActionException e ) { throw e . getException ( ) ; } } catch ( InterruptedException ie ) { return ; } catch ( SSLException ssle ) { parent . consoleExceptionPrintTrace ( ssle ) ; parent . directShutdown ( ) ; return ; } catch ( IOException ioe ) { synchronized ( parent . getShutdownSync ( ) ) { if ( ! ( parent . getShutdown ( ) ) ) { parent . consolePropertyMessage ( "DRDA_UnableToAccept.S" ) ; } } return ; } } catch ( Exception e ) { parent . consoleExceptionPrintTrace ( e ) ; } } } }

Fix:
if ( ( timeSlice ) > 0 )
Buggy code:
public class SwitchStatement extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( SwitchStatement . class , "expression" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; public static final ChildListPropertyDescriptor STATEMENTS_PROPERTY = new ChildListPropertyDescriptor ( SwitchStatement . class , "statements" , Statement . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression expression = null ; private ASTNode . NodeList statements = new ASTNode . NodeList ( SwitchStatement . STATEMENTS_PROPERTY ) ; SwitchStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { SwitchStatement result = new SwitchStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setExpression ( ( ( Expression ) ( getExpression ( ) . clone ( target ) ) ) ) ; result . statements ( ) . addAll ( ASTNode . copySubtrees ( target , statements ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public List statements ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "//owners//*//pets//{petId}//visits//new" ) @ SessionAttributes ( "visit" ) public class AddVisitForm { private final Clinic clinic ; @ Autowired public AddVisitForm ( Clinic clinic ) { } @ InitBinder public void setAllowedFields ( WebDataBinder dataBinder ) { <START_BUG> dataBinder . setDisallowedFields ( new String [ ] { "id" } ) ; <END_BUG> } @ RequestMapping ( method = RequestMethod . GET ) public String setupForm ( @ PathVariable ( "petId" ) int petId , Model model ) { } @ RequestMapping ( method = RequestMethod . POST ) public String processSubmit ( @ ModelAttribute ( "visit" ) Visit visit , BindingResult result , SessionStatus status ) { } }

Fix:
dataBinder . setDisallowedFields ( "id" ) ;
Buggy code:
public class CachedMHFolder extends MHFolder { protected LocalHeaderCache cache ; public CachedMHFolder ( AdapterNode node , FolderItem item ) { } public HeaderList getHeaderList ( WorkerStatusController worker ) throws Exception { } public void save ( ) throws Exception { } public boolean exists ( Object uid , WorkerStatusController worker ) throws Exception { } public ColumbaHeader getMessageHeader ( Object uid , WorkerStatusController worker ) throws Exception { } public AbstractMessage getMessage ( Object uid , WorkerStatusController worker ) throws Exception { if ( ( aktMessage ) != null ) { if ( aktMessage . getUID ( ) . equals ( uid ) ) { return aktMessage ; } } String source = getMessageSource ( uid , worker ) ; ColumbaHeader header = getMessageHeader ( uid , worker ) ; <START_BUG> AbstractMessage message = new Rfc822Parser ( ) . parse ( source , false , header , 0 ) ; <END_BUG> message . setUID ( uid ) ; message . setSource ( source ) ; aktMessage = message ; return message ; } public Object addMessage ( String source , WorkerStatusController worker ) throws Exception { } public Object addMessage ( AbstractMessage message , WorkerStatusController worker ) throws Exception { } public void expungeFolder ( Object [ ] uids , WorkerStatusController worker ) throws Exception { } public void removeMessage ( Object uid , WorkerStatusController worker ) throws Exception { } protected void markMessage ( Object uid , int variant , WorkerStatusController worker ) throws Exception { } public void markMessage ( Object [ ] uids , int variant , WorkerStatusController worker ) throws Exception { } public Hashtable getAttributes ( ) { } public Folder instanceNewChildNode ( AdapterNode node , FolderItem item ) { } public Object [ ] getUids ( WorkerStatusController worker ) throws Exception { } public void innerCopy ( Folder destFolder , Object [ ] uids , WorkerStatusController worker ) throws Exception { } }

Fix:
AbstractMessage message = new Rfc822Parser ( ) . parse ( source , true , header , 0 ) ;
Buggy code:
public class CheckComponent extends AbstractExpressionsUsingWorkflowComponent { private String _expression = null ; private List < String > _checkFiles = new ArrayList < String > ( ) ; private boolean _abortOnError = true ; private boolean _warnIfNothingChecked = false ; private String _emfAllChildrenSlot ; private String _fileEncoding = null ; public void setAbortOnError ( boolean abortOnError ) { } public void addCheckFile ( String checkFile ) { } public void setExpression ( String expression ) { } public void setWarnIfNothingChecked ( boolean b ) { } public void setEmfAllChildrenSlot ( String childExpression ) { } public void setFileEncoding ( String fileEncoding ) { } @ Override public String getLogMessage ( ) { } @ Override protected void invokeInternal2 ( WorkflowContext wfCtx , ProgressMonitor monitor , Issues issues ) { } @ Override public void checkConfigurationInternal ( Issues issues ) { <START_BUG> super . checkConfiguration ( issues ) ; <END_BUG> if ( ( ( _expression ) == null ) && ( ( _emfAllChildrenSlot ) != null ) ) _expression = ( ( ( _emfAllChildrenSlot ) + ".eAllContents.union<seq2seq4repair_space>(<seq2seq4repair_space>{" ) + ( _emfAllChildrenSlot ) ) + "}<seq2seq4repair_space>)" ; else if ( ( ( _expression ) != null ) && ( ( _emfAllChildrenSlot ) == null ) ) { } else issues . addError ( this , "You<seq2seq4repair_space>have<seq2seq4repair_space>to<seq2seq4repair_space>set<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>properties<seq2seq4repair_space>'expression'<seq2seq4repair_space>and<seq2seq4repair_space>'emfAllChildrenSlot'!" ) ; if ( _checkFiles . isEmpty ( ) ) issues . addError ( this , "Property<seq2seq4repair_space>'checkFile'<seq2seq4repair_space>not<seq2seq4repair_space>set!" ) ; } private Collection < ? > getExpressionResult ( WorkflowContext wfCtx , String expression2 ) { } }

Fix:
super . checkConfigurationInternal ( issues ) ;
Buggy code:
public class CompendiumHandlerTest { protected AbstractCompendiumHandler target ; @ After public void tearDown ( ) { } @ Test public void testAddingServiceWillInitiateMBeanRegistration ( ) throws Exception { } @ Test public void testRemovedServiceWillUnregisterMBean ( ) throws Exception { Object service = new Object ( ) ; ServiceReference reference = mock ( ServiceReference . class ) ; BundleContext bundleContext = mock ( BundleContext . class ) ; Logger agentLogger = mock ( Logger . class ) ; JMXAgentContext agentContext = mock ( JMXAgentContext . class ) ; when ( agentContext . getBundleContext ( ) ) . thenReturn ( bundleContext ) ; when ( agentContext . getLogger ( ) ) . thenReturn ( agentLogger ) ; ExecutorService executor = Executors . newSingleThreadExecutor ( ) ; when ( agentContext . getRegistrationExecutor ( ) ) . thenReturn ( executor ) ; AbstractCompendiumHandler concreteHandler = new CompendiumHandlerTest . CompendiumHandler ( agentContext , "org.osgi.service.Xxx" ) ; target = spy ( concreteHandler ) ; String name = "osgi.compendium:service=xxx,version=1.0" ; doReturn ( name ) . when ( target ) . getName ( ) ; target . removedService ( reference , service ) ; executor . shutdown ( ) ; executor . awaitTermination ( 2 , TimeUnit . SECONDS ) ; verify ( bundleContext ) . ungetService ( reference ) ; <START_BUG> verify ( agentContext ) . unregisterMBean ( name ) ; <END_BUG> } class CompendiumHandler extends AbstractCompendiumHandler { protected CompendiumHandler ( JMXAgentContext agentContext , Filter filter ) { } protected CompendiumHandler ( JMXAgentContext agentContext , String clazz ) { } protected StandardMBean constructInjectMBean ( Object targetService ) { } public String getBaseName ( ) { } } }

Fix:
verify ( agentContext ) . unregisterMBean ( target ) ;
Buggy code:
public class ClobStoredProcedureTest extends BaseJDBCTestCase { final String testStr = "I<seq2seq4repair_space>am<seq2seq4repair_space>a<seq2seq4repair_space>simple<seq2seq4repair_space>derby<seq2seq4repair_space>test<seq2seq4repair_space>case" ; final long testStrLength = testStr . length ( ) ; public ClobStoredProcedureTest ( String name ) { } public static Test suite ( ) { if ( JDBC . vmSupportsJSR169 ( ) ) { <START_BUG> return new TestSuite ( "empty:<seq2seq4repair_space>client<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>on<seq2seq4repair_space>JSR169" ) ; <END_BUG> } else { return TestConfiguration . defaultSuite ( ClobStoredProcedureTest . class ) ; } } public void setUp ( ) throws Exception { } public void tearDown ( ) throws Exception { } public void testGetSubStringSP ( ) throws SQLException { } public void testClobCreateLocatorSP ( ) throws SQLException { } public void testClobReleaseLocatorSP ( ) throws SQLException { } public void testClobGetLengthSP ( ) throws SQLException { } public void testClobGetPositionFromStringSP ( ) throws SQLException { } public void testClobSetStringSP ( ) throws SQLException { } public void testClobTruncateSP ( ) throws SQLException { } public void testClobGetPositionFromLocatorSP ( ) throws SQLException { } }

Fix:
return new TestSuite ( "empty:<seq2seq4repair_space>client<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>on<seq2seq4repair_space>JSR169;<seq2seq4repair_space>procs<seq2seq4repair_space>use<seq2seq4repair_space>DriverMgr" ) ;
Buggy code:
@ XmlRootElement ( name = "Autoverleih" ) public class DB_Verwalter { @ XmlElement ( name = "Kundenliste" ) @ XmlElementWrapper ( name = "wrapper" ) List < Kunde > Kunden = new ArrayList < > ( ) ; @ XmlElement ( name = "Autoliste" ) @ XmlElementWrapper ( name = "wrapper" ) List < autoverleih . Auto > Autos = new ArrayList < > ( ) ; @ XmlElement ( name = "Ausleiheliste" ) @ XmlElementWrapper ( name = "wrapper" ) List < Ausleihe > Ausleihen = new ArrayList < > ( ) ; autoverleih . Auto Auto = new autoverleih . Auto ( ) ; public DB_Verwalter ( ) { } public void Autos_anzeigen ( ) { } public void Kunden_anzeigen ( ) { int i = 0 ; while ( i <= ( ( Kunden . size ( ) ) - 1 ) ) { <START_BUG> System . out . println ( ( ( ( ( "KundenID:<seq2seq4repair_space>" + ( Kunden . get ( i ) . getKunden_ID ( ) ) ) + "<seq2seq4repair_space>Name:<seq2seq4repair_space>" ) + ( Kunden . get ( i ) . getVorname ( ) ) ) + ( Kunden . get ( i ) . getNachname ( ) ) ) ) ; <END_BUG> i ++ ; } } public void Ausleihen_anzeigen ( ) { } public void Auto_abholen ( int A_ID ) { } public void Auto_zurueckbringen ( int A_ID ) { } public List < Kunde > getKunden ( ) { } public List < autoverleih . Auto > getAutos ( ) { } public List < Ausleihe > getAusleihen ( ) { } public void setKunden ( List < Kunde > Kunden ) { } public void setAutos ( List < autoverleih . Auto > Autos ) { } public void setAusleihen ( List < Ausleihe > Ausleihen ) { } public void addKunde ( Kunde Kunde ) { } public void removeKunde ( int K_ID ) { } public void removeAuto ( int A_ID ) { } public void removeAusleihe ( int K_ID , int A_ID ) { } public void addAuto ( autoverleih . Auto auto ) { } public void addAusleihe ( Ausleihe ausleihe ) { } public boolean autoAbholen ( ) { } public boolean autoAbgeben ( ) { } public void save ( String pfad ) { } public void restore ( String pfad ) { } }

Fix:
System . out . println ( ( ( ( ( ( "KundenID:<seq2seq4repair_space>" + ( Kunden . get ( i ) . getKunden_ID ( ) ) ) + "<seq2seq4repair_space>Name:<seq2seq4repair_space>" ) + ( Kunden . get ( i ) . getVorname ( ) ) ) + "<seq2seq4repair_space>" ) + ( Kunden . get ( i ) . getNachname ( ) ) ) ) ;
Buggy code:
public class TestScenarioCreator { public static StandardEvaluationContext getTestEvaluationContext ( ) { } private static void populateFunctions ( StandardEvaluationContext testContext ) { } private static void populateVariables ( StandardEvaluationContext testContext ) { } private static void createTestClassloader ( StandardEvaluationContext testContext ) { } private static void setupRootContextObject ( StandardEvaluationContext testContext ) { } private static void populateContextMap ( StandardEvaluationContext testContext ) { } public static String isEven ( int i ) { } public static int [ ] reverseInt ( int i , int j , int k ) { } public static String reverseString ( String input ) { <START_BUG> StringBuffer backwards = new StringBuffer ( ) ; <END_BUG> for ( int i = 0 ; i < ( input . length ( ) ) ; i ++ ) { backwards . append ( input . charAt ( ( ( ( input . length ( ) ) - 1 ) - i ) ) ) ; } return backwards . toString ( ) ; } public static String varargsFunctionReverseStringsAndMerge ( String ... strings ) { } public static String varargsFunctionReverseStringsAndMerge2 ( int j , String ... strings ) { } }

Fix:
StringBuilder backwards = new StringBuilder ( ) ;
Buggy code:
public class ViewStack extends PartStack { private boolean allowStateChanges ; private WorkbenchPage page ; private SystemMenuSize sizeItem = new SystemMenuSize ( null ) ; private SystemMenuFastView fastViewAction ; private SystemMenuDetach detachViewAction ; public void addSystemActions ( IMenuManager menuManager ) { appendToGroupIfPossible ( menuManager , "misc" , new org . eclipse . ui . internal . presentations . UpdatingActionContributionItem ( fastViewAction ) ) ; appendToGroupIfPossible ( menuManager , "misc" , new org . eclipse . ui . internal . presentations . UpdatingActionContributionItem ( detachViewAction ) ) ; <START_BUG> sizeItem = new SystemMenuSize ( ( ( PartPane ) ( getSelection ( ) ) ) ) ; <END_BUG> appendToGroupIfPossible ( menuManager , "size" , sizeItem ) ; } public ViewStack ( WorkbenchPage page ) { } public ViewStack ( WorkbenchPage page , boolean allowsStateChanges ) { } public ViewStack ( WorkbenchPage page , boolean allowsStateChanges , int appearance , AbstractPresentationFactory factory ) { } protected WorkbenchPage getPage ( ) { } protected boolean canMoveFolder ( ) { } protected void updateActions ( PresentablePart current ) { } protected boolean isMoveable ( IPresentablePart part ) { } protected boolean supportsState ( int newState ) { } protected void derefPart ( LayoutPart toDeref ) { } protected boolean allowsDrop ( PartPane part ) { } public StackPresentation getTestPresentation ( ) { } }

Fix:
sizeItem = new SystemMenuSize ( getSelection ( ) ) ;
Buggy code:
public class XmlProperty extends org . apache . tools . ant . Task { private Resource src ; private String prefix = "" ; private boolean keepRoot = true ; private boolean validate = false ; private boolean collapseAttributes = false ; private boolean semanticAttributes = false ; private boolean includeSemanticAttribute = false ; private File rootDirectory = null ; private Hashtable addedAttributes = new Hashtable ( ) ; private XMLCatalog xmlCatalog = new XMLCatalog ( ) ; private static final String ID = "id" ; private static final String REF_ID = "refid" ; private static final String LOCATION = "location" ; private static final String VALUE = "value" ; private static final String PATH = "path" ; private static final String PATHID = "pathid" ; private static final String [ ] ATTRIBUTES = new String [ ] { XmlProperty . ID , XmlProperty . REF_ID , XmlProperty . LOCATION , XmlProperty . VALUE , XmlProperty . PATH , XmlProperty . PATHID } ; private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; public XmlProperty ( ) { } public void init ( ) { } protected EntityResolver getEntityResolver ( ) { } public void execute ( ) throws BuildException { } private void addNodeRecursively ( Node node , String prefix , Object container ) { } void addNodeRecursively ( Node node , String prefix ) { } public Object processNode ( Node node , String prefix , Object container ) { } private void addProperty ( String name , String value , String id ) { } private String getAttributeName ( Node attributeNode ) { } private static boolean isSemanticAttribute ( String attributeName ) { } private String getAttributeValue ( Node attributeNode ) { } public void setFile ( File src ) { } public void setSrcResource ( Resource src ) { } public void addConfigured ( ResourceCollection a ) { } public void setPrefix ( String prefix ) { } public void setKeeproot ( boolean keepRoot ) { } public void setValidate ( boolean validate ) { } public void setCollapseAttributes ( boolean collapseAttributes ) { } public void setSemanticAttributes ( boolean semanticAttributes ) { } public void setRootDirectory ( File rootDirectory ) { } public void setIncludeSemanticAttribute ( boolean includeSemanticAttribute ) { } public void addConfiguredXMLCatalog ( XMLCatalog catalog ) { } protected File getFile ( ) { } protected Resource getResource ( ) { } protected String getPrefix ( ) { } protected boolean getKeeproot ( ) { } protected boolean getValidate ( ) { } protected boolean getCollapseAttributes ( ) { } protected boolean getSemanticAttributes ( ) { } protected File getRootDirectory ( ) { } protected boolean getIncludeSementicAttribute ( ) { } private File resolveFile ( String fileName ) { if ( ( rootDirectory ) == null ) { <START_BUG> return getProject ( ) . resolveFile ( fileName ) ; <END_BUG> } return XmlProperty . FILE_UTILS . resolveFile ( rootDirectory , fileName ) ; } protected boolean supportsNonFileResources ( ) { } }

Fix:
return XmlProperty . FILE_UTILS . resolveFile ( getProject ( ) . getBaseDir ( ) , fileName ) ;
Buggy code:
public class StormSplunkTCPTopology { public static final Logger LOG = LoggerFactory . getLogger ( StormSplunkTCPTopology . class ) ; private final TopologyProperties topologyProperties ; public StormSplunkTCPTopology ( TopologyProperties topologyProperties ) { } public void runTopology ( ) throws Exception { } private StormTopology buildTopology ( ) { BrokerHosts kafkaBrokerHosts = new storm . kafka . ZkHosts ( topologyProperties . getZookeeperHosts ( ) ) ; String kafkaTopic = topologyProperties . getKafkaTopic ( ) ; <START_BUG> SpoutConfig kafkaConfig = new SpoutConfig ( kafkaBrokerHosts , topologyProperties . getKafkaTopic ( ) , "//storm//kafka" , kafkaTopic ) ; <END_BUG> kafkaConfig . forceFromStart = topologyProperties . isKafkaStartFromBeginning ( ) ; TopologyBuilder builder = new TopologyBuilder ( ) ; builder . setSpout ( "KafkaSpout" , new storm . kafka . KafkaSpout ( kafkaConfig ) , 4 ) ; builder . setBolt ( "FilterBolt" , new FilterMessageBolt ( ) , 1 ) . shuffleGrouping ( "KafkaSpout" ) ; builder . setBolt ( "SplunkTCPBolt" , new TCPBolt ( ) , 1 ) . shuffleGrouping ( "FilterBolt" ) ; return builder . createTopology ( ) ; } public static void main ( String [ ] args ) throws Exception { } }

Fix:
SpoutConfig kafkaConfig = new SpoutConfig ( kafkaBrokerHosts , kafkaTopic , "//storm//kafka" , kafkaTopic ) ;
Buggy code:
@ RunWith ( PowerMockRunner . class ) @ PowerMockRunnerDelegate ( SpringJUnit4ClassRunner . class ) @ SpringApplicationConfiguration ( classes = PacsIntegration . class ) public abstract class BaseIntegrationTest { public static HL7Service modalityStubServer ; private static final Logger log = Logger . getLogger ( BaseIntegrationTest . class ) ; @ Before public void startModalityStubServer ( ) throws InterruptedException , UnknownHostException { HapiContext hapiContext = new DefaultHapiContext ( ) ; <START_BUG> int port = 6001 ; <END_BUG> BaseIntegrationTest . modalityStubServer = hapiContext . newServer ( port , false ) ; BaseIntegrationTest . modalityStubServer . registerApplication ( "ORM" , "O01" , new ReceivingApplication ( ) { @ Override public Message processMessage ( Message message , Map < String , Object > map ) throws HL7Exception , ReceivingApplicationException { ORM_O01 ormMessage = ( ( ORM_O01 ) ( message ) ) ; return HL7Utils . generateORRwithAccept ( ormMessage . getMSH ( ) . getMessageControlID ( ) . getValue ( ) , "BahmniEMR" ) ; } @ Override public boolean canProcess ( Message message ) { return true ; } } ) ; BaseIntegrationTest . modalityStubServer . startAndWait ( ) ; System . setProperty ( "ca.uhn.hl7v2.app.initiator.timeout" , Integer . toString ( 2000 ) ) ; BaseIntegrationTest . log . debug ( ( ( ( ( ( "Starting<seq2seq4repair_space>modality<seq2seq4repair_space>stub<seq2seq4repair_space>modalityStubServer<seq2seq4repair_space>at<seq2seq4repair_space>" + ( Inet4Address . getLocalHost ( ) . getHostAddress ( ) ) ) + ":" ) + port ) + "<seq2seq4repair_space>with<seq2seq4repair_space>timeout<seq2seq4repair_space>of<seq2seq4repair_space>" ) + 2000 ) ) ; } @ After public void stopModalityStubServer ( ) { } }

Fix:
int port = 1911 ;
Buggy code:
public class JChannelFactory implements ChannelFactory , ChannelListener , ProtocolStackConfigurator { private final ProtocolStackConfiguration configuration ; private final Map < Channel , String > channels = Collections . synchronizedMap ( new WeakHashMap < Channel , String > ( ) ) ; public JChannelFactory ( ProtocolStackConfiguration configuration ) { } @ Override public Channel createChannel ( String id ) throws Exception { JChannel channel = new MuxChannel ( this ) ; TP transport = channel . getProtocolStack ( ) . getTransport ( ) ; if ( transport . isSingleton ( ) ) { synchronized ( transport ) { this . init ( transport ) ; } } else { this . init ( transport ) ; } <START_BUG> channel . setName ( configuration . getEnvironment ( ) . getNodeName ( ) ) ; <END_BUG> TransportConfiguration transportConfiguration = this . configuration . getTransport ( ) ; if ( transportConfiguration . hasTopology ( ) ) { channel . setAddressGenerator ( new TopologyAddressGenerator ( channel , transportConfiguration . getSiteId ( ) , transportConfiguration . getRackId ( ) , transportConfiguration . getMachineId ( ) ) ) ; } MBeanServer server = this . configuration . getMBeanServer ( ) ; if ( server != null ) { try { this . channels . put ( channel , id ) ; JmxConfigurator . registerChannel ( channel , server , id ) ; } catch ( Exception e ) { JGroupsLogger . ROOT_LOGGER . warn ( e . getMessage ( ) , e ) ; } channel . addChannelListener ( this ) ; } return channel ; } private void init ( TP transport ) { } @ Override public String getProtocolStackString ( ) { } @ Override public List < ProtocolConfiguration > getProtocolStack ( ) { } private void configureBindAddress ( ProtocolConfiguration protocol , ProtocolConfiguration config , SocketBinding binding ) { } private void configureServerSocket ( ProtocolConfiguration protocol , ProtocolConfiguration config , String property , SocketBinding binding ) { } private void configureMulticastSocket ( ProtocolConfiguration protocol , ProtocolConfiguration config , String addressProperty , String portProperty , SocketBinding binding ) { } private ProtocolConfiguration createProtocol ( final ProtocolConfiguration protocolConfig ) { } private void setValue ( Protocol protocol , String property , Object value ) { } @ Override public void channelConnected ( Channel channel ) { } @ Override public void channelDisconnected ( Channel channel ) { } @ Override public void channelClosed ( Channel channel ) { } }

Fix:
channel . setName ( ( ( ( configuration . getEnvironment ( ) . getNodeName ( ) ) + "//" ) + id ) ) ;
Buggy code:
public class MitgliedsDienstzeit extends Mitglied { private Date dateGeburtsdatum ; private double doubleDienstalter ; private Date dateEintrittsdatum ; private int intInstanznummer ; private double doVordienstzeit ; private SimpleDateFormat sdf = new SimpleDateFormat ( "dd.MM.yyyy" ) ; private DB_Access theInstance ; public MitgliedsDienstzeit ( int intId_Personen , String strStammblattnummer , String strDienstgrad , String strTitel , String strVorname , String strZuname , boolean boCheckbox , Date dateGeburtsdatum , double doubleDienstalter , int intInstanznummer , Date dateEntrittsdatum , double doVordienstzeit ) throws ClassNotFoundException { } public double getDoVordienstzeit ( ) { } public void setDoVordienstzeit ( double doVordienstzeit ) { } public Date getDateGeburtsdatum ( ) { } public int getIntInstanznummer ( ) { } public void setIntInstanznummer ( int intInstanznummer ) { } public Date getDateEintrittsdatum ( ) { } public void setDateEintrittsdatum ( Date dateEintrittsdatum ) { } public void setDateGeburtsdatum ( Date dateGeburtsdatum ) { } public double getDoublleDienstalter ( ) { } public void setDoubleDienstalter ( double doubleDienstalter ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { if ( ( strStammblattnummer ) == null ) { strStammblattnummer = "" ; } if ( ( strDienstgrad ) == null ) { strDienstgrad = "" ; } if ( ( strTitel ) == null ) { strTitel = "" ; } if ( ( strVorname ) == null ) { strVorname = "" ; } if ( ( strZuname ) == null ) { strZuname = "" ; } if ( ( dateGeburtsdatum ) == null ) { } strZuname = theInstance . formatiereAusgabe ( strZuname ) ; strVorname = theInstance . formatiereAusgabe ( strVorname ) ; String strHtml = "" ; if ( ( ( ( int ) ( doubleDienstalter ) ) % 10 ) == 0 ) { strHtml = ( ( ( ( ( ( ( ( ( "<tr><td><b>" + ( strStammblattnummer ) ) + "<//b><//td><td><b>" ) + ( strDienstgrad ) ) + "<//b><//td><td><b>" ) + ( strTitel ) ) + "<//b><//td><td><b>" ) + ( strVorname ) ) + "<//b><//td><td><b>" ) + ( strZuname ) ) + "<//b><//td><td><b>" ; if ( ( dateGeburtsdatum ) == null ) { strHtml += "<seq2seq4repair_space>" ; } else { strHtml += sdf . format ( dateGeburtsdatum ) ; } strHtml += ( "<//b><//td><td><b>" + ( ( int ) ( doubleDienstalter ) ) ) + "<//b><//td><//tr>" ; } else { strHtml = ( ( ( ( ( ( ( ( ( "<tr><td>" + ( strStammblattnummer ) ) + "<//td><td>" ) + ( strDienstgrad ) ) + "<//td><td>" ) + ( strTitel ) ) + "<//td><td>" ) + ( strVorname ) ) + "<//td><td>" ) + ( strZuname ) ) + "<//td><td>" ; if ( ( dateGeburtsdatum ) == null ) { strHtml += "<seq2seq4repair_space>" ; } else { strHtml += sdf . format ( dateGeburtsdatum ) ; } <START_BUG> strHtml += ( "<//td><td><b>" + ( ( int ) ( doubleDienstalter ) ) ) + "<//td><//tr>" ; <END_BUG> } return strHtml ; } }

Fix:
strHtml += ( "<//td><td>" + ( ( int ) ( doubleDienstalter ) ) ) + "<//td><//tr>" ;
Buggy code:
public class Log extends AbstractTask { private String m_message ; private LogLevel m_level = LogLevel . WARN ; public void setLevel ( final LogLevel level ) { } public void setMessage ( final String message ) { } public void addContent ( final String message ) { } public void execute ( ) throws TaskException { <START_BUG> getContext ( ) . log ( m_level , m_message ) ; <END_BUG> } private void checkNullMessage ( ) { } }

Fix:
LogLevel . log ( getContext ( ) , m_level , m_message ) ;
Buggy code:
public class Scale extends Control { int increment = 1 ; int pageIncrement = 10 ; public Scale ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { checkWidget ( ) ; NSSlider widget = ( ( NSSlider ) ( view ) ) ; NSRect oldRect = widget . frame ( ) ; widget . sizeToFit ( ) ; NSRect newRect = widget . frame ( ) ; widget . setFrame ( oldRect ) ; int width = 0 ; int height = 0 ; if ( ( ( style ) & ( SWT . HORIZONTAL ) ) != 0 ) { <START_BUG> height = ( ( int ) ( newRect . width ) ) ; <END_BUG> width = height * 10 ; } else { width = ( ( int ) ( newRect . width ) ) ; height = width * 10 ; } if ( wHint != ( SWT . DEFAULT ) ) width = wHint ; if ( hHint != ( SWT . DEFAULT ) ) height = hHint ; return new Point ( width , height ) ; } void createHandle ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } }

Fix:
height = ( ( int ) ( newRect . height ) ) ;