nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CharSetUtils { public CharSetUtils ( ) { } public static String squeeze ( String str , String ... set ) { } public static int count ( String str , String ... set ) { } public static String keep ( String str , String ... set ) { if ( str == null ) { return null ; } if ( ( ( str . length ( ) ) == 0 ) || ( CharSetUtils . deepEmpty ( set ) ) ) { <START_BUG> return "" ; <END_BUG> } return CharSetUtils . modify ( str , set , true ) ; } public static String delete ( String str , String ... set ) { } private static String modify ( String str , String [ ] set , boolean expect ) { } private static boolean deepEmpty ( String [ ] strings ) { } }

Fix:
return StringUtils . EMPTY ;
Buggy code:
public abstract class AjaxFormComponentUpdatingBehavior extends AjaxEventBehavior { public AjaxFormComponentUpdatingBehavior ( final String event ) { } @ Override protected void onBind ( ) { } protected final FormComponent getFormComponent ( ) { } @ Override protected final CharSequence getEventHandler ( ) { <START_BUG> return getCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( ) ) . append ( "',<seq2seq4repair_space>wicketSerialize(this)" ) , null , null ) ; <END_BUG> } @ Override protected void onCheckEvent ( String event ) { } @ Override protected final void onEvent ( final AjaxRequestTarget target ) { } private void onError ( AjaxRequestTarget target , RuntimeException e ) { } protected abstract void onUpdate ( final AjaxRequestTarget target ) { } }

Fix:
return getCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerialize(document.getElementById('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "'))" ) ) , null , null ) ;
Buggy code:
public class ModelTypeValidator implements ParameterValidator { protected final EnumSet < ModelType > validTypes ; protected final boolean nullable ; protected final boolean strictType ; public ModelTypeValidator ( final ModelType type ) { } public ModelTypeValidator ( final ModelType type , final boolean nullable ) { } public ModelTypeValidator ( final ModelType type , final boolean nullable , final boolean allowExpressions ) { } public ModelTypeValidator ( final ModelType type , final boolean nullable , final boolean allowExpressions , final boolean strictType ) { } public ModelTypeValidator ( final boolean nullable , final boolean allowExpressions , final boolean strictType , ModelType firstValidType , ModelType ... otherValidTypes ) { } @ Override public void validateParameter ( String parameterName , ModelNode value ) throws OperationFailedException { if ( ! ( value . isDefined ( ) ) ) { if ( ! ( nullable ) ) <START_BUG> throw new OperationFailedException ( new ModelNode ( ) . set ( ( parameterName + "<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null<seq2seq4repair_space>" ) ) ) ; <END_BUG> } else { boolean matched = false ; if ( strictType ) { matched = validTypes . contains ( value . getType ( ) ) ; } else { for ( ModelType validType : validTypes ) { if ( matches ( value , validType ) ) { matched = true ; break ; } } } if ( ! matched ) throw new OperationFailedException ( new ModelNode ( ) . set ( ( ( ( ( ( "Wrong<seq2seq4repair_space>type<seq2seq4repair_space>for<seq2seq4repair_space>" + parameterName ) + ".<seq2seq4repair_space>Expected<seq2seq4repair_space>" ) + ( validTypes . toString ( ) ) ) + "<seq2seq4repair_space>but<seq2seq4repair_space>was<seq2seq4repair_space>" ) + ( value . getType ( ) ) ) ) ) ; } } @ Override public void validateResolvedParameter ( String parameterName , ModelNode value ) throws OperationFailedException { } private boolean matches ( ModelNode value , ModelType validType ) { } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( ( parameterName + "<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null." ) ) ) ;
Buggy code:
public class MiruMergeChitsTest { @ Test ( enabled = false , description = "Tests<seq2seq4repair_space>convergence<seq2seq4repair_space>behavior" ) public void testMerge ( ) throws Exception { <START_BUG> final MiruMergeChits mergeChits = new MiruMergeChits ( 2000000 , 0.5 ) ; <END_BUG> ScheduledExecutorService scheduledInfo = Executors . newScheduledThreadPool ( 1 ) ; ScheduledExecutorService scheduledMergers = Executors . newScheduledThreadPool ( 8 ) ; List < Future < ? > > futures = Lists . newArrayList ( ) ; futures . add ( scheduledInfo . scheduleWithFixedDelay ( new Runnable ( ) { @ Override public void run ( ) { System . out . println ( ( ( ( "free=" + ( mergeChits . numberOfChitsRemaining ( ) ) ) + ",<seq2seq4repair_space>maxElapse=" ) + ( mergeChits . maxElapsedWithoutMergeInMillis ( ) ) ) ) ; } } , 1000 , 1000 , TimeUnit . MILLISECONDS ) ) ; final Semaphore mergeLock = new Semaphore ( 3 ) ; int [ ] [ ] callersAndRates = new int [ ] [ ] { new int [ ] { 1024 , 1 } , new int [ ] { 512 , 2 } , new int [ ] { 256 , 4 } , new int [ ] { 128 , 8 } , new int [ ] { 64 , 16 } , new int [ ] { 32 , 32 } , new int [ ] { 16 , 64 } , new int [ ] { 8 , 128 } , new int [ ] { 4 , 256 } } ; for ( int i = 0 ; i < ( callersAndRates . length ) ; i ++ ) { final int callers = callersAndRates [ i ] [ 0 ] ; final int rate = callersAndRates [ i ] [ 1 ] ; for ( int j = 0 ; j < callers ; j ++ ) { final AtomicLong taken = new AtomicLong ( 0 ) ; final AtomicLong lastTake = new AtomicLong ( System . currentTimeMillis ( ) ) ; final AtomicLong lastMerge = new AtomicLong ( System . currentTimeMillis ( ) ) ; futures . add ( scheduledMergers . scheduleWithFixedDelay ( new Runnable ( ) { @ Override public void run ( ) { long currentTime = System . currentTimeMillis ( ) ; long elapsed = currentTime - ( lastMerge . get ( ) ) ; long count = ( ( long ) ( ( ( ( double ) ( rate ) ) * ( ( double ) ( currentTime - ( lastTake . getAndSet ( currentTime ) ) ) ) ) // 1000.0 ) ) ; mergeChits . take ( count ) ; long have = taken . addAndGet ( count ) ; if ( mergeChits . merge ( have , elapsed ) ) { notifyMerged ( elapsed ) ; mergeChits . refund ( taken . getAndSet ( 0 ) ) ; lastMerge . set ( currentTime ) ; try { mergeLock . acquire ( ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } try { Thread . sleep ( 100 ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } finally { mergeLock . release ( ) ; } } } } , 1000 , 1000 , TimeUnit . MILLISECONDS ) ) ; Thread . sleep ( 10 ) ; } } Thread . sleep ( TimeUnit . HOURS . toMillis ( 10 ) ) ; scheduledInfo . shutdownNow ( ) ; scheduledMergers . shutdownNow ( ) ; scheduledInfo . awaitTermination ( 30 , TimeUnit . SECONDS ) ; scheduledMergers . awaitTermination ( 30 , TimeUnit . SECONDS ) ; } private final AtomicLong mergeCount = new AtomicLong ( 0 ) ; private final AtomicLong elapsedSum = new AtomicLong ( 0 ) ; private void notifyMerged ( long elapsed ) { } No newline ; at end ; of file ; }

Fix:
final MiruMergeChits mergeChits = new MiruMergeChits ( 2000000 , 0.5 , 1000 ) ;
Buggy code:
public class Button extends Control { String text = "" ; Image image ; Image image2 ; Image disabledImage ; ImageList imageList ; boolean ignoreMouse ; static final int MARGIN = 4 ; static final int CHECK_WIDTH ; static final int CHECK_HEIGHT ; static final int ICON_WIDTH = 128 ; static final int ICON_HEIGHT = 128 ; static final int ButtonProc ; static final TCHAR ButtonClass = new TCHAR ( 0 , "BUTTON" , true ) ; public Button ( Composite parent , int style ) { } void _setImage ( Image image ) { } void _setText ( String text ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } void click ( ) { } int computeLeftMargin ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { super . createHandle ( ) ; if ( ( ( style ) & ( SWT . PUSH ) ) == 0 ) state |= THEME_BACKGROUND ; <START_BUG> if ( ( ( OS . COMCTL32_MAJOR ) >= 6 ) && ( OS . IsAppThemed ( ) ) ) { <END_BUG> if ( ( ( style ) & ( SWT . RADIO ) ) != 0 ) state |= DRAW_BACKGROUND ; } } int defaultBackground ( ) { } int defaultForeground ( ) { } void enableWidget ( boolean enabled ) { } public int getAlignment ( ) { } boolean getDefault ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public boolean getSelection ( ) { } public String getText ( ) { } boolean isTabItem ( ) { } boolean mnemonicHit ( char ch ) { } boolean mnemonicMatch ( char key ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAlignment ( int alignment ) { } void setDefault ( boolean value ) { } boolean setFixedFocus ( ) { } public void setImage ( Image image ) { } boolean setRadioFocus ( ) { } boolean setRadioSelection ( boolean value ) { } boolean setSavedFocus ( ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_ERASEBKGND ( int wParam , int lParam ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_LBUTTONDOWN ( int wParam , int lParam ) { } LRESULT WM_LBUTTONUP ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT WM_SYSCOLORCHANGE ( int wParam , int lParam ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { } LRESULT wmColorChild ( int wParam , int lParam ) { } LRESULT wmDrawChild ( int wParam , int lParam ) { } }

Fix:
if ( ( OS . COMCTL32_MAJOR ) >= 6 ) {
Buggy code:
public abstract class AbstractBeanFactoryBasedTargetSource implements Serializable , TargetSource , BeanFactoryAware { private static final long serialVersionUID = - 4721607536018568393L ; protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private String targetBeanName ; private Class targetClass ; private BeanFactory beanFactory ; public void setTargetBeanName ( String targetBeanName ) { } public String getTargetBeanName ( ) { } public void setTargetClass ( Class targetClass ) { } public void setBeanFactory ( BeanFactory beanFactory ) throws BeansException { } public BeanFactory getBeanFactory ( ) { } public synchronized Class getTargetClass ( ) { } public boolean isStatic ( ) { } public void releaseTarget ( Object target ) throws Exception { } protected void copyFrom ( AbstractBeanFactoryBasedTargetSource other ) { } protected Object writeReplace ( ) throws ObjectStreamException { } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> sb . append ( ClassUtils . getShortName ( getClass ( ) ) ) ; sb . append ( "<seq2seq4repair_space>for<seq2seq4repair_space>target<seq2seq4repair_space>bean<seq2seq4repair_space>'" ) . append ( this . targetBeanName ) . append ( "'" ) ; if ( ( this . targetClass ) != null ) { sb . append ( "<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>[" ) . append ( this . targetClass . getName ( ) ) . append ( "]" ) ; } return sb . toString ( ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
public class FunctionReference extends SpelNodeImpl { private final String name ; public FunctionReference ( String functionName , int pos , SpelNodeImpl ... arguments ) { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { } private TypedValue executeFunctionJLRMethod ( ExpressionState state , Method method ) throws EvaluationException { Object [ ] functionArgs = getArguments ( state ) ; if ( ( ! ( method . isVarArgs ( ) ) ) && ( ( method . getParameterTypes ( ) . length ) != ( functionArgs . length ) ) ) { throw new org . springframework . expression . spel . SpelEvaluationException ( SpelMessage . INCORRECT_NUMBER_OF_ARGUMENTS_TO_FUNCTION , functionArgs . length , method . getParameterTypes ( ) . length ) ; } if ( ! ( Modifier . isStatic ( method . getModifiers ( ) ) ) ) { throw new org . springframework . expression . spel . SpelEvaluationException ( getStartPosition ( ) , SpelMessage . FUNCTION_MUST_BE_STATIC , ( ( ( method . getDeclaringClass ( ) . getName ( ) ) + "." ) + ( method . getName ( ) ) ) , name ) ; } if ( functionArgs != null ) { TypeConverter converter = state . getEvaluationContext ( ) . getTypeConverter ( ) ; ReflectionHelper . convertAllArguments ( converter , functionArgs , method ) ; } if ( method . isVarArgs ( ) ) { functionArgs = ReflectionHelper . setupArgumentsForVarargsInvocation ( method . getParameterTypes ( ) , functionArgs ) ; } try { ReflectionUtils . makeAccessible ( method ) ; Object result = method . invoke ( method . getClass ( ) , functionArgs ) ; <START_BUG> return new TypedValue ( result , new org . springframework . core . convert . TypeDescriptor ( new org . springframework . core . MethodParameter ( method , ( - 1 ) ) ) . narrowType ( result ) ) ; <END_BUG> } catch ( Exception ex ) { throw new org . springframework . expression . spel . SpelEvaluationException ( getStartPosition ( ) , ex , SpelMessage . EXCEPTION_DURING_FUNCTION_CALL , this . name , ex . getMessage ( ) ) ; } } @ Override public String toStringAST ( ) { } private Object [ ] getArguments ( ExpressionState state ) throws EvaluationException { } }

Fix:
return new TypedValue ( result , new org . springframework . core . convert . TypeDescriptor ( new org . springframework . core . MethodParameter ( method , ( - 1 ) ) ) . narrow ( result ) ) ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public class RcpModule extends AbstractModule implements Module { @ Override protected void configure ( ) { } private void configureAstProvider ( ) { } private void bindRcpServiceListener ( ) { } @ Singleton @ Provides public JavaModelEventsService provideJavaModelEventsProvider ( final EventBus bus , final IWorkspaceRoot workspace ) { } @ Singleton @ Provides public EventBus provideWorkspaceEventBus ( ) { } @ Provides public IProxyService provideProxyService ( ) { } @ Provides public IWebBrowser provideWebBrowser ( IWorkbench wb ) throws PartInitException { } @ Provides @ Singleton public JavaElementSelectionService provideJavaSelectionProvider ( final EventBus bus ) { final JavaElementSelectionService provider = new JavaElementSelectionService ( bus ) ; <START_BUG> new UIJob ( "Registering<seq2seq4repair_space>workbench<seq2seq4repair_space>selection<seq2seq4repair_space>listener." ) { <END_BUG> @ Override public IStatus runInUIThread ( final IProgressMonitor monitor ) { final IWorkbenchWindow ww = PlatformUI . getWorkbench ( ) . getActiveWorkbenchWindow ( ) ; final ISelectionService service = ( ( ISelectionService ) ( ww . getService ( ISelectionService . class ) ) ) ; service . addPostSelectionListener ( provider ) ; return Status . OK_STATUS ; } } ; return provider ; } @ Provides public IWorkspaceRoot provideWorkspaceRoot ( ) { } @ Provides public IWorkspace provideWorkspace ( ) { } @ Provides public Display provideDisplay ( ) { } @ Provides public IWorkbench provideWorkbench ( ) { } @ Provides public IWorkbenchPage provideActiveWorkbenchPage ( final IWorkbench wb ) { } @ Provides public Shell provideActiveShell ( IWorkbench wb ) { } private RcpModule . ActivePageFinder runUiFinder ( ) { } private boolean isRunningInUiThread ( ) { } @ Provides public IJavaModel provideJavaModel ( ) { } @ Provides public JavaModelManager provideJavaModelManger ( ) { } @ Provides public IExtensionRegistry provideRegistry ( ) { } private void checkBundleResolution ( ) { } static class RcpServiceMatcher extends AbstractMatcher < Object > { @ Override public boolean matches ( Object t ) { } } static class Helper { @ Inject JavaElementSelectionService provider ; @ Inject org . eclipse . recommenders . internal . rcp . JavaModelEventsService JavaModelEventsService ; } static class Listener implements TypeListener { @ Override public < I > void hear ( TypeLiteral < I > type , TypeEncounter < I > encounter ) { } } private static final class ActivePageFinder implements Callable < IWorkbenchPage > { private IWorkbench workbench ; private IWorkbenchWindow activeWorkbenchWindow ; private IWorkbenchPage activePage ; @ Override public IWorkbenchPage call ( ) throws Exception { } } }

Fix:
new UIJob ( Messages . JOB_NAME_SELECTION_LISTENER_REGISTRATION ) {
Buggy code:
public class XO extends GameRealization { public static void main ( String [ ] args ) { GameRealization game = new GameRealization ( ) ; game . initGame ( ) ; <START_BUG> game . showHistoryMovies ( historyOfGame ) ; <END_BUG> } }

Fix:
game . showHistoryMovies ( ) ;
Buggy code:
public abstract class ChessPiece implements Serializable { private static final long serialVersionUID = 1L ; protected Color color ; protected ImageIcon representation ; protected int x ; protected int y ; protected String rep ; public ChessPiece ( Color color , ImageIcon representation , int x , int y , String rep ) { } public String getRep ( ) { } public Color getColor ( ) { } public ImageIcon getRepresentation ( ) { } public int getX ( ) { } public int getY ( ) { } public void updatePosition ( int x , int y ) { } public boolean validatePath ( List < ChessSquare > path , int x , int y ) { if ( path . isEmpty ( ) ) return false ; if ( ( ( x == ( - 999 ) ) || ( y == ( - 999 ) ) ) || ( ( ( this . x ) == x ) && ( ( this . y ) == y ) ) ) return false ; for ( ChessSquare square : path ) { if ( ( ! ( square . isEmpty ( ) ) ) && ( square != ( path . get ( ( ( path . size ( ) ) - 1 ) ) ) ) ) return false ; <START_BUG> if ( ( ( ! ( square . isEmpty ( ) ) ) && ( ( square . getChessPiece ( ) . getColor ( ) ) == ( this . color ) ) ) && ( square == ( path . get ( path . size ( ) ) ) ) ) <END_BUG> return false ; } return true ; } public abstract List < ChessSquare > getPath ( ChessBoard board , int x , int y ) { } public boolean move ( ChessBoard board , int x , int y ) { } }

Fix:
if ( ( ( ! ( square . isEmpty ( ) ) ) && ( ( square . getChessPiece ( ) . getColor ( ) ) == ( this . color ) ) ) && ( square == ( path . get ( ( ( path . size ( ) ) - 1 ) ) ) ) )
Buggy code:
final class JVMEnvironmentVariableRemoveHandler implements OperationStepHandler , DescriptionProvider { static final String OPERATION_NAME = "remove-item-from-environment-variables-list" ; static final JVMEnvironmentVariableRemoveHandler INSTANCE = new JVMEnvironmentVariableRemoveHandler ( ) ; private final ParameterValidator validator = new StringLengthValidator ( 1 ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { validator . validateParameter ( NAME , operation . get ( NAME ) ) ; final Resource resource = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; final ModelNode model = resource . getModel ( ) ; final String name = operation . require ( NAME ) . asString ( ) ; ModelNode variables = model . get ( JVM_ENV_VARIABLES ) ; if ( variables . isDefined ( ) ) { final ModelNode values = variables . clone ( ) ; model . get ( JVM_ENV_VARIABLES ) . setEmptyList ( ) ; for ( Property value : values . asPropertyList ( ) ) { if ( ! ( value . getName ( ) . equals ( name ) ) ) { model . get ( JVM_ENV_VARIABLES ) . add ( value . getName ( ) , value . getValue ( ) ) ; } } } <START_BUG> context . completeStep ( ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public abstract class MarkupContainer extends Component { private static final Log log = LogFactory . getLog ( MarkupContainer . class ) ; private static final Map markupCache = new HashMap ( ) ; private static final int MINIMAP_MAX_ENTRIES = 8 ; private static final boolean optimizeChildMapsForSpace = false ; private Map childForName = Collections . EMPTY_MAP ; private transient MarkupStream markupStream ; public MarkupContainer ( final String name ) { } public MarkupContainer ( String name , Serializable object ) { } public MarkupContainer ( String name , Serializable object , String expression ) { } public MarkupContainer add ( final Component child ) { } public final Component get ( final String path ) { } public final Iterator iterator ( ) { } public final boolean contains ( final Component component , final boolean recurse ) { } public void removeAll ( ) { } public MarkupContainer replace ( final Component child ) { } public final int size ( ) { } public String toString ( ) { final StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( "[path<seq2seq4repair_space>=<seq2seq4repair_space>" ) ; buffer . append ( super . toString ( ) ) ; if ( ( markupStream ) != null ) { buffer . append ( ( ",<seq2seq4repair_space>markupStream<seq2seq4repair_space>=<seq2seq4repair_space>" + ( markupStream ) ) ) ; } <START_BUG> if ( ( childForName . size ( ) ) != 0 ) { <END_BUG> buffer . append ( ( ",<seq2seq4repair_space>children<seq2seq4repair_space>=<seq2seq4repair_space>" + ( childForName ) ) ) ; } buffer . append ( ']' ) ; return buffer . toString ( ) ; } public final Object visitChildren ( final Class c , final IVisitor visitor ) { } public final Object visitChildren ( final IVisitor visitor ) { } protected final MarkupStream findMarkupStream ( ) { } protected final MarkupStream getMarkupStream ( ) { } protected String getMarkupType ( ) { } protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected void onRender ( ) { } protected final void renderAssociatedMarkup ( final String openTagName , final String exceptionMessage ) { } protected final void renderComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected boolean resolveComponent ( final MarkupStream markupStream , final ComponentTag tag ) { } protected final void setMarkupStream ( final MarkupStream markupStream ) { } final Markup getAssociatedMarkup ( ) { } final MarkupStream getAssociatedMarkupStream ( ) { } final boolean hasAssociatedMarkup ( ) { } final void renderAll ( final MarkupStream markupStream ) { } private Markup loadMarkup ( final Application application , final String key , final IResource markupResource ) throws IOException , ParseException , ResourceNotFoundException { } private Markup loadMarkupAndWatchForChanges ( final String key , final IResource markupResource ) { } private String markupKey ( ) { } private void optimize ( ) { } private void renderNext ( final MarkupStream markupStream ) { } }

Fix:
if ( ( ( childForName ) != null ) && ( ( childForName . size ( ) ) != 0 ) ) {
Buggy code:
public interface XSLoader { public DOMConfiguration getConfig ( ) { } public XSModel loadURIList ( StringList uriList ) { } <START_BUG> public XSModel loadInputList ( DOMInputList is ) ; <END_BUG> public XSModel loadURI ( String uri ) { } public XSModel load ( LSInput is ) { } }

Fix:
public XSModel loadInputList ( LSInputList is ) ;
Buggy code:
public class SockJsClient implements Lifecycle , WebSocketClient { private static final boolean jackson2Present = ClassUtils . isPresent ( "com.fasterxml.jackson.databind.ObjectMapper" , SockJsClient . class . getClassLoader ( ) ) ; private static final Log logger = LogFactory . getLog ( SockJsClient . class ) ; private InfoReceiver infoReceiver ; private final List < Transport > transports ; private SockJsMessageCodec messageCodec ; private TaskScheduler connectTimeoutScheduler ; private final Map < URI , SockJsClient . ServerInfo > serverInfoCache = new ConcurrentHashMap < URI , SockJsClient . ServerInfo > ( ) ; private volatile boolean running = false ; public SockJsClient ( List < Transport > transports ) { } private static InfoReceiver initInfoReceiver ( List < Transport > transports ) { } public void setInfoReceiver ( InfoReceiver infoReceiver ) { } public InfoReceiver getInfoReceiver ( ) { } public void setMessageCodec ( SockJsMessageCodec messageCodec ) { } public SockJsMessageCodec getMessageCodec ( ) { } public void setConnectTimeoutScheduler ( TaskScheduler connectTimeoutScheduler ) { } @ Override public void start ( ) { } @ Override public void stop ( ) { <START_BUG> if ( ! ( isRunning ( ) ) ) { <END_BUG> this . running = false ; for ( Transport transport : this . transports ) { if ( transport instanceof Lifecycle ) { if ( ( ( Lifecycle ) ( transport ) ) . isRunning ( ) ) { ( ( Lifecycle ) ( transport ) ) . stop ( ) ; } } } } } @ Override public boolean isRunning ( ) { } public void clearServerInfoCache ( ) { } @ Override public ListenableFuture < WebSocketSession > doHandshake ( WebSocketHandler handler , String uriTemplate , Object ... uriVars ) { } @ Override public final ListenableFuture < WebSocketSession > doHandshake ( WebSocketHandler handler , WebSocketHttpHeaders headers , URI url ) { } private SockJsClient . ServerInfo getServerInfo ( SockJsUrlInfo sockJsUrlInfo ) { } private DefaultTransportRequest createRequest ( SockJsUrlInfo urlInfo , HttpHeaders headers , SockJsClient . ServerInfo serverInfo ) { } protected Principal getUser ( ) { } private static class ServerInfo { private final boolean webSocketEnabled ; private final long responseTime ; private ServerInfo ( String response , long responseTime ) { } public boolean isWebSocketEnabled ( ) { } public long getRetransmissionTimeout ( ) { } } }

Fix:
if ( isRunning ( ) ) {
Buggy code:
public class SequenceBadgeFactory implements BadgeFactory { private static final int ROWS = 5 ; private static final int COLUMNS = 2 ; private final Color backgroundColor ; private final Color foregroundColor ; private final int startInclusive ; private final int endInclusive ; public SequenceBadgeFactory ( Color backgroundColor , Color foregroundColor , int startInclusive , int endInclusive ) { } @ Override public boolean hasPage ( int pageIndex ) { <START_BUG> return pageIndex <= ( ( ( ( endInclusive ) - ( startInclusive ) ) + 1 ) // ( ( SequenceBadgeFactory . ROWS ) * ( SequenceBadgeFactory . COLUMNS ) ) ) ; <END_BUG> } @ Override public Page getPage ( int pageIndex ) { } }

Fix:
return pageIndex < ( Math . ceil ( ( ( ( ( ( double ) ( endInclusive ) ) - ( startInclusive ) ) + 1 ) // ( ( SequenceBadgeFactory . ROWS ) * ( SequenceBadgeFactory . COLUMNS ) ) ) ) ) ;
Buggy code:
public class OAuthLoginHelper { private String xauthUrl_access ; private String oauth1Url_request ; private String oauth1Url_access ; private String oauth2Url_auth ; private String oauth2Url_grant ; private String key ; private String secret ; private String oauthToken ; private String oauthSecret ; private String access_token ; private String token_secret ; private OAuthLoginHelper . OAuthLoginListener listener ; private WebView webView ; private String accessUrl ; private String redirect_uri = "http:////oob" ; public static OAuthLoginHelper newXAuthLoginHelper ( String consumerKey , String consumerSecret , String accessUrl , OAuthLoginHelper . OAuthLoginListener listener ) { } public static OAuthLoginHelper newAuth1LoginHelper ( String consumerKey , String consumerSecret , String requestUrl , String accessUrl , OAuthLoginHelper . OAuthLoginListener listener ) { } public static OAuthLoginHelper newAuth2LoginHelper ( String clientId , String clientSecret , String authUrl , String grantUrl , String redirectUri , OAuthLoginHelper . OAuthLoginListener listener ) { } public void setRedirectUri ( String uri ) { } public void loginByXauth ( String userName , String passwd ) { } public void loginByOauth1 ( WebView view ) { } public void loginByOauth2 ( WebView view ) { } public void getUrlForOauth1Request ( ) { } public void oauth1Verify ( ) { } public class Jsi { @ SuppressWarnings ( "unused" ) @ JavascriptInterface public void access ( String verifier ) { } } public void getOauth1AccessToken ( String verifier ) { } public void getOauth2AccessToken ( String code ) { } private ConnectionTool getConnectionTool ( OAuthVersion version ) { ConnectionTool tool ; switch ( version ) { case VER_1 : tool = OAuthConnectionTool . newOaut1ConnectionTool ( key , secret ) ; break ; case VER_2 : <START_BUG> tool = new HttpConnectionTool ( ) ; <END_BUG> break ; default : tool = null ; } return tool ; } private String getOauth2RequestUrl ( ) { } public interface OAuthLoginListener { void onRequestUrlGot ( ) { } void onVerify ( ) { } void onAccessTokenGot ( String token , String secret ) { } void onError ( String msg ) { } } }

Fix:
tool = OAuthConnectionTool . newOauth2ConnectionTool ( ) ;
Buggy code:
public class BoundedQueueThreadPoolAdd extends AbstractAddStepHandler { static final AttributeDefinition [ ] BLOCKING_ATTRIBUTES = new AttributeDefinition [ ] { PoolAttributeDefinitions . KEEPALIVE_TIME , PoolAttributeDefinitions . MAX_THREADS , PoolAttributeDefinitions . THREAD_FACTORY , PoolAttributeDefinitions . CORE_THREADS , PoolAttributeDefinitions . QUEUE_LENGTH , PoolAttributeDefinitions . ALLOW_CORE_TIMEOUT } ; static final AttributeDefinition [ ] NON_BLOCKING_ATTRIBUTES = new AttributeDefinition [ ( BoundedQueueThreadPoolAdd . BLOCKING_ATTRIBUTES . length ) + 1 ] ; static final AttributeDefinition [ ] RW_ATTRIBUTES = new AttributeDefinition [ ] { PoolAttributeDefinitions . KEEPALIVE_TIME , PoolAttributeDefinitions . MAX_THREADS , PoolAttributeDefinitions . CORE_THREADS , PoolAttributeDefinitions . QUEUE_LENGTH , PoolAttributeDefinitions . ALLOW_CORE_TIMEOUT } ; private final boolean blocking ; private final ThreadFactoryResolver threadFactoryResolver ; private final HandoffExecutorResolver handoffExecutorResolver ; private final ServiceName serviceNameBase ; public BoundedQueueThreadPoolAdd ( boolean blocking , ThreadFactoryResolver threadFactoryResolver , HandoffExecutorResolver handoffExecutorResolver , ServiceName serviceNameBase ) { } @ 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 BoundedThreadPoolParameters params = ThreadPoolManagementUtils . parseBoundedThreadPoolParameters ( context , operation , model , blocking ) ; final BoundedQueueThreadPoolService service = new BoundedQueueThreadPoolService ( params . getCoreThreads ( ) , params . getMaxThreads ( ) , params . getQueueLength ( ) , blocking , params . getKeepAliveTime ( ) , params . isAllowCoreTimeout ( ) ) ; <START_BUG> ThreadPoolManagementUtils . installThreadPoolService ( service , params . getName ( ) , serviceNameBase , params . getThreadFactory ( ) , threadFactoryResolver , service . getThreadFactoryInjector ( ) , params . getHandoffExecutor ( ) , handoffExecutorResolver , service . getHandoffExecutorInjector ( ) , context . getServiceTarget ( ) , newControllers , verificationHandler ) ; <END_BUG> } boolean isBlocking ( ) { } ServiceName getServiceNameBase ( ) { } ThreadFactoryResolver getThreadFactoryResolver ( ) { } HandoffExecutorResolver getHandoffExecutorResolver ( ) { } }

Fix:
ThreadPoolManagementUtils . installThreadPoolService ( service , params . getName ( ) , serviceNameBase , params . getThreadFactory ( ) , threadFactoryResolver , service . getThreadFactoryInjector ( ) , params . getHandoffExecutor ( ) , handoffExecutorResolver , ( blocking ? null : service . getHandoffExecutorInjector ( ) ) , context . getServiceTarget ( ) , newControllers , verificationHandler ) ;
Buggy code:
public class DockerInfrastructureTests { private static final Logger LOG = LoggerFactory . getLogger ( DockerInfrastructureTests . class ) ; private DockerInfrastructureTests ( ) { } public static void testDeploysTrivialApplication ( TestApplication app , Location location ) { <START_BUG> DockerInfrastructure dockerInfrastructure = app . createAndManageChild ( EntitySpec . create ( DockerInfrastructure . class ) . configure ( DOCKER_HOST_CLUSTER_MIN_SIZE , 1 ) . configure ( WEAVE_ENABLED , false ) . displayName ( "Docker<seq2seq4repair_space>Infrastructure" ) ) ; <END_BUG> DockerInfrastructureTests . LOG . info ( "Starting<seq2seq4repair_space>{}<seq2seq4repair_space>in<seq2seq4repair_space>{}" , dockerInfrastructure , location ) ; app . start ( ImmutableList . of ( location ) ) ; DockerInfrastructureTests . LOG . info ( "Waiting<seq2seq4repair_space>{}<seq2seq4repair_space>for<seq2seq4repair_space>{}<seq2seq4repair_space>to<seq2seq4repair_space>have<seq2seq4repair_space>started" , FIVE_MINUTES , dockerInfrastructure ) ; EntityTestUtils . assertAttributeEqualsEventually ( ImmutableMap . of ( "timeout" , FIVE_MINUTES ) , dockerInfrastructure , SERVICE_UP , true ) ; int existingCount = dockerInfrastructure . getAttribute ( DOCKER_CONTAINER_COUNT ) ; TestApplication deployment = ApplicationBuilder . newManagedApp ( TestApplication . class , app . getManagementContext ( ) ) ; deployment . createAndManageChild ( EntitySpec . create ( EmptySoftwareProcess . class ) ) ; deployment . start ( ImmutableList . of ( dockerInfrastructure . getDynamicLocation ( ) ) ) ; EntityTestUtils . assertAttributeEqualsEventually ( deployment , SERVICE_STATE_ACTUAL , RUNNING ) ; EntityTestUtils . assertAttributeEqualsEventually ( dockerInfrastructure , DOCKER_CONTAINER_COUNT , ( existingCount + 1 ) ) ; } }

Fix:
DockerInfrastructure dockerInfrastructure = app . createAndManageChild ( EntitySpec . create ( DockerInfrastructure . class ) . configure ( DOCKER_HOST_CLUSTER_MIN_SIZE , 1 ) . configure ( SDN_ENABLE , false ) . displayName ( "Docker<seq2seq4repair_space>Infrastructure" ) ) ;
Buggy code:
public class Ant extends Task { private File dir = null ; private String antFile = null ; private String target = null ; private String output = null ; private boolean inheritAll = true ; Vector properties = new Vector ( ) ; Project p1 ; public void setInheritAll ( boolean inherit ) { } public void init ( ) { } private void reinit ( ) { } private void initializeProject ( ) { Vector listeners = project . getBuildListeners ( ) ; for ( int i = 0 ; i < ( listeners . size ( ) ) ; i ++ ) { p1 . addBuildListener ( ( ( BuildListener ) ( listeners . elementAt ( i ) ) ) ) ; } if ( ( output ) != null ) { try { PrintStream out = new PrintStream ( new FileOutputStream ( output ) ) ; DefaultLogger logger = new DefaultLogger ( ) ; logger . setMessageOutputLevel ( MSG_INFO ) ; logger . setOutputPrintStream ( out ) ; logger . setErrorPrintStream ( out ) ; p1 . addBuildListener ( logger ) ; } catch ( IOException ex ) { log ( ( "Ant:<seq2seq4repair_space>Can't<seq2seq4repair_space>set<seq2seq4repair_space>output<seq2seq4repair_space>to<seq2seq4repair_space>" + ( output ) ) ) ; } } Hashtable taskdefs = project . getTaskDefinitions ( ) ; Enumeration et = taskdefs . keys ( ) ; while ( et . hasMoreElements ( ) ) { String taskName = ( ( String ) ( et . nextElement ( ) ) ) ; Class taskClass = ( ( Class ) ( taskdefs . get ( taskName ) ) ) ; p1 . addTaskDefinition ( taskName , taskClass ) ; } Hashtable typedefs = project . getDataTypeDefinitions ( ) ; Enumeration e = typedefs . keys ( ) ; while ( e . hasMoreElements ( ) ) { String typeName = ( ( String ) ( e . nextElement ( ) ) ) ; Class typeClass = ( ( Class ) ( typedefs . get ( typeName ) ) ) ; p1 . addDataTypeDefinition ( typeName , typeClass ) ; } Hashtable prop1 ; if ( ( inheritAll ) == true ) { prop1 = project . getProperties ( ) ; } else { prop1 = project . getUserProperties ( ) ; <START_BUG> project . setSystemProperties ( ) ; <END_BUG> } e = prop1 . keys ( ) ; while ( e . hasMoreElements ( ) ) { String arg = ( ( String ) ( e . nextElement ( ) ) ) ; String value = ( ( String ) ( prop1 . get ( arg ) ) ) ; if ( ( inheritAll ) == true ) p1 . setProperty ( arg , value ) ; else p1 . setUserProperty ( arg , value ) ; } } protected void handleOutput ( String line ) { } protected void handleErrorOutput ( String line ) { } public void execute ( ) throws BuildException { } public void setDir ( File d ) { } public void setAntfile ( String s ) { } public void setTarget ( String s ) { } public void setOutput ( String s ) { } public Property createProperty ( ) { } }

Fix:
p1 . setSystemProperties ( ) ;
Buggy code:
public class EulerTest { @ Test public void testMain ( ) { String output ; String [ ] testArray = new String [ ] { "1,2,3,4,5,6,7,8,9,1" , "1,5,2,3,5,4,3,1" , "1,2" , "1,2,3,4,5,6,7,8,9" , "1,2,3,4,5,6,5,4,3,2,1" , "1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9" , "1,2,1,3,1,4,2,3,2,4,3,4" } ; String [ ] expectedResultArray = new String [ ] { "true" , "true" , "false" , "false" , "false" , "false" , "false" } ; String [ ] resultArray ; String testFileName = "JUnitEulerTestFile.txt" ; BufferedWriter outputWriter = null ; try { outputWriter = new BufferedWriter ( new FileWriter ( testFileName ) ) ; for ( int i = 0 ; i < ( testArray . length ) ; i ++ ) { outputWriter . write ( testArray [ i ] ) ; outputWriter . newLine ( ) ; } outputWriter . flush ( ) ; outputWriter . close ( ) ; } catch ( IOException e ) { fail ( "The<seq2seq4repair_space>test<seq2seq4repair_space>was<seq2seq4repair_space>unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>test<seq2seq4repair_space>file.<seq2seq4repair_space>That's<seq2seq4repair_space>a<seq2seq4repair_space>shame!" ) ; } <START_BUG> TestObject . runStatic ( "main" , ( ( Object ) ( new String [ ] { testFileName } ) ) ) ; <END_BUG> output = TestObject . getLastMethodOutput ( ) ; resultArray = output . split ( "\n" ) ; if ( ( resultArray . length ) > ( testArray . length ) ) { fail ( "Your<seq2seq4repair_space>program<seq2seq4repair_space>wrote<seq2seq4repair_space>more<seq2seq4repair_space>output<seq2seq4repair_space>lines<seq2seq4repair_space>than<seq2seq4repair_space>there<seq2seq4repair_space>were<seq2seq4repair_space>lines<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>input<seq2seq4repair_space>file." ) ; } else if ( ( resultArray . length ) < ( testArray . length ) ) { fail ( "Your<seq2seq4repair_space>program<seq2seq4repair_space>wrote<seq2seq4repair_space>less<seq2seq4repair_space>output<seq2seq4repair_space>lines<seq2seq4repair_space>than<seq2seq4repair_space>there<seq2seq4repair_space>were<seq2seq4repair_space>lines<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>input<seq2seq4repair_space>file." ) ; } for ( int i = 0 ; i < ( resultArray . length ) ; i ++ ) { assertEquals ( ( ( "Your<seq2seq4repair_space>program's<seq2seq4repair_space>output<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>line<seq2seq4repair_space>'" + ( testArray [ i ] ) ) + "'" ) , expectedResultArray [ i ] , resultArray [ i ] ) ; } new File ( testFileName ) . delete ( ) ; } }

Fix:
TestObject . runStaticVoid ( "main" , ( ( Object ) ( new String [ ] { testFileName } ) ) ) ;
Buggy code:
public class PrintMessageCommand extends FolderCommand { private cPrintObject mailHeader ; private cPrintObject mailFooter ; private DateFormat mailDateFormat ; private String [ ] headerKeys = new String [ ] { "from" , "to" , "date" , "subject" } ; public PrintMessageCommand ( FrameController frameController , DefaultCommandReference [ ] references ) { } public cPrintObject getMailHeader ( ) { } public cPrintObject getMailFooter ( ) { } public String [ ] getHeaderKeys ( ) { } public DateFormat getMailDateFormat ( ) { } public void updatedGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { MailFrameController mailFrameController = ( ( MailFrameController ) ( frameController ) ) ; FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( getReferences ( ) ) ) ; Object [ ] uids = r [ 0 ] . getUids ( ) ; Folder srcFolder = ( ( Folder ) ( r [ 0 ] . getFolder ( ) ) ) ; for ( int j = 0 ; j < ( uids . length ) ; j ++ ) { Object uid = uids [ j ] ; <START_BUG> Message message = ( ( Message ) ( srcFolder . getMessage ( uid , worker ) ) ) ; <END_BUG> ColumbaHeader header = srcFolder . getMessageHeader ( uid , worker ) ; MimePartTree mimePartTree = srcFolder . getMimePartTree ( uid , worker ) ; boolean viewhtml = MailConfig . getMainFrameOptionsConfig ( ) . getWindowItem ( ) . getHtmlViewer ( ) ; MimePart bodyPart = null ; if ( viewhtml ) bodyPart = mimePartTree . getFirstTextPart ( "html" ) ; else bodyPart = mimePartTree . getFirstTextPart ( "plain" ) ; if ( bodyPart == null ) { bodyPart = new MimePart ( ) ; bodyPart . setBody ( new String ( "<No<seq2seq4repair_space>Message-Text>" ) ) ; } else bodyPart = srcFolder . getMimePart ( uid , bodyPart . getAddress ( ) , worker ) ; cDocument messageDoc = new cDocument ( ) ; messageDoc . setHeader ( getMailHeader ( ) ) ; messageDoc . setFooter ( getMailFooter ( ) ) ; String [ ] headerKeys = getHeaderKeys ( ) ; cParagraph hKey ; cParagraph hValue ; cHGroup hLine ; Object value ; for ( int i = 0 ; i < ( Array . getLength ( headerKeys ) ) ; i ++ ) { hKey = new cParagraph ( ) ; hKey . setText ( MailResourceLoader . getString ( "header" , headerKeys [ i ] ) ) ; hKey . setFontStyle ( Font . BOLD ) ; hValue = new cParagraph ( ) ; if ( headerKeys [ i ] . equals ( "date" ) ) { value = header . get ( "columba.date" ) ; } else { value = header . get ( headerKeys [ i ] ) ; } if ( value instanceof Date ) { hValue . setText ( getMailDateFormat ( ) . format ( ( ( Date ) ( value ) ) ) ) ; } else { hValue . setText ( ( ( String ) ( value ) ) ) ; } hValue . setLeftMargin ( new org . columba . core . print . cCmUnit ( 3.0 ) ) ; hLine = new cHGroup ( ) ; hLine . add ( hKey ) ; hLine . add ( hValue ) ; messageDoc . appendPrintObject ( hLine ) ; cParagraph body = new cParagraph ( ) ; body . setTopMargin ( new org . columba . core . print . cCmUnit ( 1.0 ) ) ; messageDoc . appendPrintObject ( body ) ; messageDoc . print ( ) ; } } } }

Fix:
Message message = new Message ( ) ;
Buggy code:
public final class ThreadFactoryPriorityUpdate extends AbstractThreadsSubsystemUpdate < Void > { private static final long serialVersionUID = 4253625376544201028L ; private final String name ; private final Integer newPriority ; public ThreadFactoryPriorityUpdate ( final String name , final Integer newPriority ) { } public ThreadFactoryPriorityUpdate getCompensatingUpdate ( final ThreadsSubsystemElement original ) { } protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > handler , final P param ) { <START_BUG> final ServiceController < ? > service = updateContext . getServiceContainer ( ) . getService ( Services . threadFactoryName ( name ) ) ; <END_BUG> if ( service == null ) { handler . handleFailure ( notConfigured ( ) , param ) ; } else { try { final ThreadFactoryService threadFactoryService = ( ( ThreadFactoryService ) ( service . getValue ( ) ) ) ; threadFactoryService . setPriority ( newPriority ) ; handler . handleSuccess ( null , param ) ; } catch ( Throwable t ) { handler . handleFailure ( t , param ) ; } } } protected void applyUpdate ( final ThreadsSubsystemElement element ) throws UpdateFailedException { } public Integer getNewPriority ( ) { } public String getName ( ) { } private UpdateFailedException notConfigured ( ) { } }

Fix:
final ServiceController < ? > service = updateContext . getServiceContainer ( ) . getService ( ThreadsServices . threadFactoryName ( name ) ) ;
Buggy code:
public class CheckPurchasedItems extends ListOneListGen { @ Override protected void onCreate ( Bundle savedInstanceState ) { } protected void setTitle ( ) { <START_BUG> String title = "Obi<seq2seq4repair_space>Grocery<seq2seq4repair_space>-<seq2seq4repair_space>Purchase<seq2seq4repair_space>with<seq2seq4repair_space>List<seq2seq4repair_space>" + ( shoppingListId ) ; <END_BUG> this . setTitle ( title ) ; } protected void setInstructions ( ) { } protected void populateList ( ) { } }

Fix:
String title = "Smart<seq2seq4repair_space>Grocery<seq2seq4repair_space>-<seq2seq4repair_space>Purchase<seq2seq4repair_space>with<seq2seq4repair_space>List<seq2seq4repair_space>" + ( shoppingListId ) ;
Buggy code:
public class Euler { public static void main ( String [ ] args ) { <START_BUG> Problem curProb = new PE0032 ( ) ; <END_BUG> String result = curProb . getResult ( ) ; IO . info ( ( "result<seq2seq4repair_space>for<seq2seq4repair_space>problem<seq2seq4repair_space>#" + curProb ) ) ; IO . info ( ( ( "<seq2seq4repair_space>is<seq2seq4repair_space>'" + result ) + "'" ) ) ; IO . infoln ( ( ( "<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>" + ( curProb . getRuntime ( 2 ) ) ) + "<seq2seq4repair_space>ms" ) ) ; } }

Fix:
Problem curProb = new PE0038 ( ) ;
Buggy code:
public class Animation extends TileImage { static final int DEFAULT_DURATION = 125 ; public List < Animation . Frame > frames = new ArrayList < Animation . Frame > ( ) ; public int totalDuration ; public static Animation load ( File aniFile , LoaderContext ctx ) throws IOException { } public static Animation read ( XMLStreamReader in , LoaderContext ctx ) throws XMLStreamException { } public void addFrame ( TileImage img , int duration ) { totalDuration += duration ; <START_BUG> Animation . Frame f = new Animation . Frame ( img , totalDuration ) ; <END_BUG> frames . add ( f ) ; } public TileImage getFrameByTime ( int acycle ) { } void load ( XMLStreamReader in , LoaderContext ctx ) throws XMLStreamException { } public class Frame { public final TileImage frame ; public final int duration ; public Frame ( TileImage frame , int duration ) { } } private TileImage getDefaultImage ( ) { } @ Override public void drawFragment ( Graphics2D gr , int destX , int destY , int srcX , int srcY ) { } }

Fix:
Animation . Frame f = new Animation . Frame ( img , duration ) ;
Buggy code:
public class AddPlanActivity extends BaseActivity implements View . OnClickListener { private Context mContext ; private EditText edt_plan_title ; private EditText edt_plan_des ; private TextView tv_start_date ; private TextView tv_end_date ; private TextView tv_warn_title ; private TextView tv_warn_date ; private Button btn_add_plan ; private int year ; private int month ; private int day ; private DataBaseHelper dbHelper ; private String title ; private String startDateStr ; private String endDateStr ; private String description ; private Date startDate ; private Date endDate ; private int recordDays ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override protected int getLayoutID ( ) { } private void initData ( ) { mContext = this ; <START_BUG> dbHelper = new DataBaseHelper ( mContext , null ) ; <END_BUG> initDate ( ) ; } private void initEvent ( ) { } private void initView ( ) { } @ Override public void onClick ( View v ) { } private void initDate ( ) { } private void selectDate ( final TextView textView ) { } private void showWarning ( int warnViewID , String warnStr ) { } private void hideWarning ( ) { } private boolean isComplete ( ) { } private void getPlanInfo ( ) { } private void savePlan ( ) { } }

Fix:
dbHelper = DataBaseHelper . GetInstance ( mContext , null ) ;