nus-yam/ex-repair huggingface dataset:
Buggy code:
public class AllocationExpression extends Expression implements InvocationSite { public TypeReference type ; public Expression [ ] arguments ; public MethodBinding binding ; MethodBinding syntheticAccessor ; public AllocationExpression ( ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public Expression enclosingInstance ( ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } public void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope ) { if ( binding . alwaysNeedsAccessMethod ( ) ) { <START_BUG> syntheticAccessor = binding . getAccessMethod ( ) ; <END_BUG> return ; } if ( ( binding . isPrivate ( ) ) && ( ( currentScope . enclosingSourceType ( ) ) != ( binding . declaringClass ) ) ) { if ( currentScope . environment ( ) . options . isPrivateConstructorAccessChangingVisibility ) { binding . tagForClearingPrivateModifier ( ) ; } else { syntheticAccessor = ( ( SourceTypeBinding ) ( binding . declaringClass ) ) . addSyntheticMethod ( binding ) ; currentScope . problemReporter ( ) . needToEmulateMethodAccess ( binding , this ) ; } } } public TypeBinding resolveType ( BlockScope scope ) { } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setDepth ( int i ) { } public void setFieldIndex ( int i ) { } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
syntheticAccessor = binding . getAccessMethod ( true ) ;
Buggy code:
class SpinnerTab extends RangeTab { Spinner spinner1 ; Group spinnerGroup ; Button readOnlyButton ; Button wrapButton ; Scale incrementScale ; Scale pageIncrementScale ; Scale digitsScale ; SpinnerTab ( ControlExample instance ) { } void createControlWidgets ( ) { } void createExampleGroup ( ) { super . createExampleGroup ( ) ; spinnerGroup = new Group ( exampleGroup , SWT . NONE ) ; spinnerGroup . setLayout ( new GridLayout ( ) ) ; <START_BUG> spinnerGroup . setLayoutData ( new GridData ( ( ( ( GridData . GRAB_HORIZONTAL ) | ( GridData . HORIZONTAL_ALIGN_FILL ) ) | ( GridData . VERTICAL_ALIGN_FILL ) ) ) ) ; <END_BUG> spinnerGroup . setText ( "Spinner" ) ; } void createExampleWidgets ( ) { } void createMaximumGroup ( ) { } void createSelectionGroup ( ) { } void createIncrementGroup ( ) { } void createPageIncrementGroup ( ) { } void createDigitsGroup ( ) { } Composite createTabFolderPage ( TabFolder tabFolder ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { } String getTabText ( ) { } void setExampleWidgetState ( ) { } void setWidgetIncrement ( ) { } void setWidgetMaximum ( ) { } void setWidgetMinimum ( ) { } void setWidgetPageIncrement ( ) { } void setWidgetDigits ( ) { } void setWidgetSelection ( ) { } }

Fix:
spinnerGroup . setLayoutData ( new GridData ( SWT . FILL , SWT . FILL , true , true ) ) ;
Buggy code:
@ Service public class UserInternaturDetailServiceImpl implements UserInternaturDetailService { @ Autowired private UserInternaturDetailDao userInternaturDetailDao ; @ Autowired private DocumentInfoService documentInfoService ; @ Autowired private BaseService baseService ; @ Autowired private DocumentInfoDao documentInfoDao ; @ Override @ Transactional ( readOnly = false , propagation = Propagation . REQUIRES_NEW , rollbackFor = Exception . class ) public UserInternaturDetail saveInternaturDetails ( final UserInternaturDetail userInternaturDetail ) { } @ Override @ Transactional ( readOnly = true , propagation = Propagation . REQUIRES_NEW ) public UserInternaturDetailDto getInternatorDtoForUser ( final Long userId ) { try { UserInternaturDetail userInternaturDetail = userInternaturDetailDao . getUserInternatureDetail ( userId ) ; UserInternaturDetailDto dto = new UserInternaturDetailDto ( userInternaturDetail ) ; List < DocumentInfo > docInfoList = documentInfoDao . getDocumentInfoList ( UserInternaturDetail . class . getAnnotation ( Table . class ) . name ( ) , userId , null , INTERNATUR ) ; Map < Long , DocumentInfo > docsMap = baseService . getDocumentMapfromList ( docInfoList ) ; <START_BUG> if ( null != ( docsMap . get ( userInternaturDetail . getId ( ) ) ) ) { <END_BUG> dto . getCertificateInternatur ( ) . setFileName ( docsMap . get ( userInternaturDetail . getId ( ) ) . getFileName ( ) ) ; dto . getCertificateInternatur ( ) . setDocId ( docsMap . get ( userInternaturDetail . getId ( ) ) . getId ( ) ) ; dto . getCertificateInternatur ( ) . setEntityId ( docsMap . get ( userInternaturDetail . getId ( ) ) . getEntityId ( ) ) ; } return dto ; } catch ( Exception e ) { throw new GDEException ( e ) ; } } @ Override @ Transactional ( readOnly = false , propagation = Propagation . REQUIRES_NEW , rollbackFor = Exception . class ) public UserInternaturDetail saveInternaturdetails ( final UserInternaturDetailDto dto , final GdeUser user ) { } }

Fix:
if ( ( null != userInternaturDetail ) && ( null != ( docsMap . get ( userInternaturDetail . getId ( ) ) ) ) ) {
Buggy code:
public class DefaultRequestTargetResolverStrategy implements IRequestTargetResolverStrategy { public DefaultRequestTargetResolverStrategy ( ) { } public final IRequestTarget resolve ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveSharedResource ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveRenderedPage ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveListenerInterfaceTarget ( final RequestCycle requestCycle , final Page page , final String componentPath , final String interfaceName , final RequestParameters requestParameters ) { if ( interfaceName . equals ( INTERFACE . getName ( ) ) ) { return new wicket . request . target . component . listener . RedirectPageRequestTarget ( page ) ; } else { final RequestListenerInterface listener = RequestListenerInterface . forName ( interfaceName ) ; if ( listener == null ) { throw new WicketRuntimeException ( ( "Attempt<seq2seq4repair_space>to<seq2seq4repair_space>access<seq2seq4repair_space>unknown<seq2seq4repair_space>request<seq2seq4repair_space>listener<seq2seq4repair_space>interface<seq2seq4repair_space>" + interfaceName ) ) ; } final String pageRelativeComponentPath = Strings . afterFirstPathComponent ( componentPath , PATH_SEPARATOR ) ; if ( Strings . isEmpty ( pageRelativeComponentPath ) ) { throw new WicketRuntimeException ( ( ( "When<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>call<seq2seq4repair_space>" + listener ) + ",<seq2seq4repair_space>a<seq2seq4repair_space>component<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>provided" ) ) ; } final Component component = page . get ( pageRelativeComponentPath ) ; if ( component == null ) { throw new WicketRuntimeException ( ( "Attempt<seq2seq4repair_space>to<seq2seq4repair_space>call<seq2seq4repair_space>listener<seq2seq4repair_space>method<seq2seq4repair_space>on<seq2seq4repair_space>non-existant<seq2seq4repair_space>component:<seq2seq4repair_space>" + componentPath ) ) ; } <START_BUG> if ( ! ( component . isVisible ( ) ) ) { <END_BUG> throw new WicketRuntimeException ( ( "Calling<seq2seq4repair_space>listener<seq2seq4repair_space>methods<seq2seq4repair_space>on<seq2seq4repair_space>components<seq2seq4repair_space>that<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>visible<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>allowed:<seq2seq4repair_space>" + componentPath ) ) ; } return listener . newRequestTarget ( page , component , listener , requestParameters ) ; } } protected IRequestTarget resolveBookmarkablePage ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveHomePageTarget ( final RequestCycle requestCycle , final RequestParameters requestParameters ) { } protected IRequestTarget resolveExternalResource ( RequestCycle requestCycle ) { } }

Fix:
if ( ! ( component . isVisibleInHierarchy ( ) ) ) {
Buggy code:
public class ArgsPointcut extends NameBindingPointcut { TypePatternList arguments ; public ArgsPointcut ( TypePatternList arguments ) { } <START_BUG> public FuzzyBoolean fastMatch ( ResolvedTypeX type ) { <END_BUG> return FuzzyBoolean . MAYBE ; } public FuzzyBoolean match ( Shadow shadow ) { } public void write ( DataOutputStream s ) throws IOException { } public static Pointcut read ( DataInputStream s , ISourceContext context ) throws IOException { } public boolean equals ( Object other ) { } public int hashCode ( ) { } public void resolveBindings ( IScope scope , Bindings bindings ) { } public void postRead ( ResolvedTypeX enclosingType ) { } public Pointcut concretize1 ( ResolvedTypeX inAspect , IntMap bindings ) { } private Test findResidueNoEllipsis ( Shadow shadow , ExposedState state , TypePattern [ ] patterns ) { } public Test findResidue ( Shadow shadow , ExposedState state ) { } public String toString ( ) { } }

Fix:
public FuzzyBoolean fastMatch ( FastMatchInfo type ) {
Buggy code:
public class EntityImpl extends NodeContainer implements Entity { static final long serialVersionUID = - 3575760943444303423L ; protected String publicId ; protected String systemId ; protected String notationName ; public EntityImpl ( DocumentImpl ownerDoc , String name ) { } public short getNodeType ( ) { } public String getNodeValue ( ) { } public void setNodeValue ( String value ) throws DOMException { <START_BUG> throw new DOMExceptionImpl ( DOMException . NO_MODIFICATION_ALLOWED_ERR , "NO_MODIFICATION_ALLOWED_ERR" ) ; <END_BUG> } public String getPublicId ( ) { } public String getSystemId ( ) { } public String getNotationName ( ) { } public void setPublicId ( String id ) { } public void setSystemId ( String id ) { } public void setNotationName ( String name ) { } }

Fix:
throw new DOMExceptionImpl ( DOMException . NO_MODIFICATION_ALLOWED_ERR , "DOM001<seq2seq4repair_space>Modification<seq2seq4repair_space>not<seq2seq4repair_space>allowed" ) ;
Buggy code:
public class Screen extends JFrame { private TopCardPanel topCardPanel ; private PickCardsPanel pickCardsPanel ; private AllPlayersPanel allPlayersPanel ; private PlayersCardsPanel playersCardsPanel ; private JPanel currentPlayer ; private JLabel player ; private UpdatesPanel activityLogPanel ; private boolean isMyTurn ; private SocketOutStream socket ; private int myPlayerIndex ; public Screen ( ScreenShot screenShot , String playersName , SocketOutStream socket ) { } public void showDisconnected ( ) { } public void update ( ScreenShot screenShot ) { isMyTurn = false ; if ( ( screenShot . currentPlayerIndex ) == ( myPlayerIndex ) ) { isMyTurn = true ; pickCardsPanel . update ( isMyTurn ) ; topCardPanel . setTopCard ( screenShot . topCard . getColor ( ) . getColor ( ) , screenShot . topCard . numberToString ( ) ) ; allPlayersPanel . update ( screenShot . playersInfo , screenShot . isInAscendingOrder ) ; <START_BUG> playersCardsPanel . update ( screenShot . myCards ) ; <END_BUG> player . setText ( ( ( screenShot . playersInfo [ screenShot . currentPlayerIndex ] . getName ( ) ) + "\'s<seq2seq4repair_space>turn" ) ) ; playersCardsPanel . enableCards ( isMyTurn ) ; } else { pickCardsPanel . update ( isMyTurn ) ; topCardPanel . setTopCard ( screenShot . topCard . getColor ( ) . getColor ( ) , screenShot . topCard . numberToString ( ) ) ; allPlayersPanel . update ( screenShot . playersInfo , screenShot . isInAscendingOrder ) ; player . setText ( ( ( screenShot . playersInfo [ screenShot . currentPlayerIndex ] . getName ( ) ) + "\'s<seq2seq4repair_space>turn" ) ) ; playersCardsPanel . enableCards ( isMyTurn ) ; } } public void setMyPlayerIndex ( int length ) { } }

Fix:
playersCardsPanel . update ( screenShot . myCards , screenShot . topCard ) ;
Buggy code:
public abstract class AjaxFormChoiceComponentUpdatingBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; public AjaxFormChoiceComponentUpdatingBehavior ( ) { } @ Override public void renderHead ( IHeaderResponse response ) { super . renderHead ( response ) ; AppendingStringBuffer asb = new AppendingStringBuffer ( ) ; asb . append ( "function<seq2seq4repair_space>attachChoiceHandlers(markupId,<seq2seq4repair_space>callbackScript)<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputNodes<seq2seq4repair_space>=<seq2seq4repair_space>wicketGet(markupId).getElementsByTagName(\'input\');\n" ) ; asb . append ( "<seq2seq4repair_space>for<seq2seq4repair_space>(var<seq2seq4repair_space>i<seq2seq4repair_space>=<seq2seq4repair_space>0<seq2seq4repair_space>;<seq2seq4repair_space>i<seq2seq4repair_space><<seq2seq4repair_space>inputNodes.length<seq2seq4repair_space>;<seq2seq4repair_space>i<seq2seq4repair_space>++)<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputNode<seq2seq4repair_space>=<seq2seq4repair_space>inputNodes[i];\n" ) ; asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!inputNode.type)<seq2seq4repair_space>continue;\n" ) ; <START_BUG> asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!(inputNode.className.indexOf(\'wicket-\'+markupId)===0)&&!(inputNode.id.indexOf(markupId+\'-\')===0))<seq2seq4repair_space>continue;\n" ) ; <END_BUG> asb . append ( "<seq2seq4repair_space>var<seq2seq4repair_space>inputType<seq2seq4repair_space>=<seq2seq4repair_space>inputNode.type.toLowerCase();\n" ) ; asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(inputType<seq2seq4repair_space>==<seq2seq4repair_space>\'checkbox\'<seq2seq4repair_space>||<seq2seq4repair_space>inputType<seq2seq4repair_space>==<seq2seq4repair_space>\'radio\')<seq2seq4repair_space>{\n" ) ; asb . append ( "<seq2seq4repair_space>Wicket.Event.add(inputNode,<seq2seq4repair_space>\'click\',<seq2seq4repair_space>callbackScript);\n" ) ; asb . append ( "<seq2seq4repair_space>}\n" ) ; asb . append ( "<seq2seq4repair_space>}\n" ) ; asb . append ( "}\n" ) ; response . renderJavascript ( asb , "attachChoice" ) ; response . renderOnLoadJavascript ( ( ( ( ( "attachChoiceHandlers('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "',<seq2seq4repair_space>function()<seq2seq4repair_space>{" ) + ( getEventHandler ( ) ) ) + "});" ) ) ; } protected abstract void onUpdate ( AjaxRequestTarget target ) { } protected void onError ( AjaxRequestTarget target , RuntimeException e ) { } @ Override protected void onBind ( ) { } protected final FormComponent < ? > getFormComponent ( ) { } protected final CharSequence getEventHandler ( ) { } @ Override protected final void respond ( final AjaxRequestTarget target ) { } }

Fix:
asb . append ( "<seq2seq4repair_space>if<seq2seq4repair_space>(!(inputNode.className.indexOf(\'wicket-\'+markupId)>=0)&&!(inputNode.id.indexOf(markupId+\'-\')>=0))<seq2seq4repair_space>continue;\n" ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class SimpleModuleRegistrationTestCase { @ Inject public ServiceContainer container ; @ Deployment public static JavaArchive createdeployment ( ) { } @ Test public void testFindPackageCapability ( ) throws Exception { } @ Test public void testResolveModule ( ) throws Exception { XResourceBuilder builder = XResourceBuilderFactory . create ( ) ; builder . addCapability ( IdentityNamespace . IDENTITY_NAMESPACE , "somename" ) ; builder . addRequirement ( PackageNamespace . PACKAGE_NAMESPACE , SimpleService . class . getPackage ( ) . getName ( ) ) ; Resource resource = builder . getResource ( ) ; XResolver resolver = getResolver ( ) ; XEnvironment env = getEnvironment ( ) ; <START_BUG> ResolveContext context = resolver . createResolverContext ( env , Collections . singleton ( resource ) , null ) ; <END_BUG> Map < Resource , List < Wire > > wiremap = resolver . resolve ( context ) ; assertEquals ( ( "One<seq2seq4repair_space>Resource:<seq2seq4repair_space>" + wiremap ) , 1 , wiremap . size ( ) ) ; List < Wire > wires = wiremap . get ( resource ) ; assertEquals ( 1 , wires . size ( ) ) ; Wire wire = wires . get ( 0 ) ; assertEquals ( resource , wire . getRequirer ( ) ) ; XResource provider = ( ( XResource ) ( wire . getProvider ( ) ) ) ; XIdentityCapability icap = provider . getIdentityCapability ( ) ; assertEquals ( "deployment.example-module-reg" , icap . getSymbolicName ( ) ) ; } private XEnvironment getEnvironment ( ) { } private XResolver getResolver ( ) { } }

Fix:
ResolveContext context = resolver . createResolveContext ( env , Collections . singleton ( resource ) , null ) ;
Buggy code:
public class NezParser extends NodeVisitor { Grammar loaded ; Production product ; public NezParser ( ) { } public Grammar load ( SourceContext sc , GrammarChecker checker ) { this . loaded = new Grammar ( sc . getResourceName ( ) ) ; while ( sc . hasUnconsumed ( ) ) { AST ast = product . parse ( sc , new AST ( ) ) ; if ( ast == null ) { <START_BUG> ConsoleUtils . exit ( 1 , sc . formatPositionMessage ( "error" , sc . getPosition ( ) , "syntax<seq2seq4repair_space>error" ) ) ; <END_BUG> } if ( ! ( this . parse ( ast , checker ) ) ) { break ; } } checker . verify ( loaded ) ; return loaded ; } private boolean parse ( AST ast , GrammarChecker checker ) { } private void readAnnotations ( Rule rule , AST pego ) { } Expression toExpression ( AST po ) { } public Expression toNonTerminal ( AST ast ) { } private String quote ( String t ) { } public Expression toString ( AST ast ) { } public Expression toCharacterSequence ( AST ast ) { } public Expression toCharacter ( AST ast ) { } public Expression toByte ( AST ast ) { } public Expression toAny ( AST ast ) { } public Expression toChoice ( AST ast ) { } public Expression toSequence ( AST ast ) { } public Expression toNot ( AST ast ) { } public Expression toAnd ( AST ast ) { } public Expression toOption ( AST ast ) { } public Expression toOneMoreRepetition ( AST ast ) { } public Expression toRepetition ( AST ast ) { } public Expression toConstructor ( AST ast ) { } public Expression toLeftJoin ( AST ast ) { } public Expression toConnector ( AST ast ) { } public Expression toTagging ( AST ast ) { } public Expression toValue ( AST ast ) { } public Expression toMatch ( AST ast ) { } public Expression toIf ( AST ast ) { } public Expression toWith ( AST ast ) { } public Expression toWithout ( AST ast ) { } public Expression toBlock ( AST ast ) { } public Expression toDef ( AST ast ) { } public Expression toIs ( AST ast ) { } public Expression toIsa ( AST ast ) { } public Expression toDefIndent ( AST ast ) { } public Expression toIndent ( AST ast ) { } }

Fix:
ConsoleUtils . exit ( 1 , sc . getSyntaxErrorMessage ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class InflowTestCase extends AbstractMgmtTestBase { @ Deployment public static ResourceAdapterArchive createDeployment ( ) throws Exception { } @ Inject public ServiceContainer serviceContainer ; @ Test public void testRegistryConfiguration ( ) throws Throwable { <START_BUG> ServiceController < ? > controller = serviceContainer . getService ( RA_REPOSISTORY_SERVICE ) ; <END_BUG> assertNotNull ( controller ) ; ResourceAdapterRepository repository = ( ( ResourceAdapterRepository ) ( controller . getValue ( ) ) ) ; assertNotNull ( repository ) ; Set < String > ids = repository . getResourceAdapters ( MessageListener . class ) ; assertNotNull ( ids ) ; assertEquals ( 1 , ids . size ( ) ) ; String piId = ids . iterator ( ) . next ( ) ; assertNotNull ( piId ) ; Endpoint endpoint = repository . getEndpoint ( piId ) ; assertNotNull ( endpoint ) ; List < MessageListener > listeners = repository . getMessageListeners ( piId ) ; assertNotNull ( listeners ) ; assertEquals ( 1 , listeners . size ( ) ) ; MessageListener listener = listeners . get ( 0 ) ; ActivationSpec as = listener . getActivation ( ) . createInstance ( ) ; assertNotNull ( as ) ; assertNotNull ( as . getResourceAdapter ( ) ) ; } @ Test public void testMetadataConfiguration ( ) throws Throwable { } }

Fix:
ServiceController < ? > controller = serviceContainer . getService ( RA_REPOSITORY_SERVICE ) ;
Buggy code:
public class RMTWicketTester extends WicketTester { private static final Logger log = LoggerFactory . getLogger ( RMTWicketTester . class ) ; private Filter filter = new Filter ( "\"de\\.flower\\.rmt\\.model\\.[^-]*?\"" ) ; private LoggingSerializer loggingSerializer = new LoggingSerializer ( filter ) ; private boolean serializationCheck = true ; public RMTWicketTester ( final WebApplication application ) { } public String getDebugComponentTrees ( ) { } public String getDebugComponentTrees ( final String filter ) { final StringBuilder s = new StringBuilder ( ) ; <START_BUG> for ( final WicketTesterHelper . ComponentData obj : WicketTesterHelper . getComponentData ( getLastRenderedPage ( ) ) ) { <END_BUG> if ( obj . path . matches ( ( ( ".*" + filter ) + ".*" ) ) ) { s . append ( "path\t" ) . append ( obj . path ) . append ( "<seq2seq4repair_space>\t" ) . append ( obj . type ) . append ( "<seq2seq4repair_space>\t[" ) . append ( obj . value ) . append ( "]\n" ) ; } } return s . toString ( ) ; } @ Override public void debugComponentTrees ( ) { } @ Override public void dumpPage ( ) { } public void dumpComponentWithPage ( ) { } public void dumpAjaxResponse ( ) { } public String getComponentWithPage ( ) { } public void assertAjaxValidationError ( final String path , final String value ) { } public void assertNoAjaxValidationError ( final String path , final String value ) { } public void assertAjaxValidationError ( final Component field , final String value ) { } public void assertNoAjaxValidationError ( final Component field , final String value ) { } private void assertAjaxValidation ( final Component field , final String path , final String value , final boolean expectError ) { } public void assertErrorMessagesContains ( final String ... errorMessagesParts ) { } public List < String > getMessagesAsString ( final int level ) { } public void assertComponentNotOnAjaxResponse ( final String componentPath ) { } @ Override public boolean processRequest ( final MockHttpServletRequest request , final IRequestHandler forcedRequestHandler ) { } private void inspectSerializedPage ( ) { } @ Override public Component getComponentFromLastRenderedPage ( final String path , final boolean wantVisibleInHierarchy ) { } public void assertComponentCssClass ( final String path , final String expectedCssClass ) { } public boolean isSerializationCheck ( ) { } public void setSerializationCheck ( final boolean serializationCheck ) { } protected Component findComponent ( String name , boolean wantVisibleInHierarchy ) { } protected List < Component > getAllComponents ( MarkupContainer parent ) { } No newline ; at end ; of file ; }

Fix:
for ( final WicketTesterHelper . ComponentData obj : RMTWicketTesterHelper . getComponentData ( getLastRenderedPage ( ) , false ) ) {
Buggy code:
public abstract class ManagementRequest < T > extends ManagementResponseHandler < T > { private final Logger log = Logger . getLogger ( "org.jboss.as.protocol" ) ; private static final AtomicInteger requestId = new AtomicInteger ( ) ; private final int currentRequestId = ManagementRequest . requestId . incrementAndGet ( ) ; private final ManagementRequest . ManagementFuture < T > future = new ManagementRequest . ManagementFuture < T > ( ) ; private final int batchId ; protected ManagementRequest ( ) { } protected ManagementRequest ( int batchId ) { } protected abstract byte getRequestCode ( ) { } protected int getCurrentRequestId ( ) { } protected int getBatchId ( ) { } public AsyncFuture < T > execute ( final ExecutorService executor , final ManagementClientChannelStrategy channelStrategy ) { <START_BUG> log . tracef ( "Scheduling<seq2seq4repair_space>request<seq2seq4repair_space>%s<seq2seq4repair_space>with<seq2seq4repair_space>future<seq2seq4repair_space>%s<seq2seq4repair_space>-<seq2seq4repair_space>%d<seq2seq4repair_space>(%d)" , this , this ) ; <END_BUG> executor . execute ( new Runnable ( ) { @ Override public void run ( ) { try { final ManagementChannel channel = channelStrategy . getChannel ( ) ; log . tracef ( "Got<seq2seq4repair_space>channel<seq2seq4repair_space>%s<seq2seq4repair_space>from<seq2seq4repair_space>request<seq2seq4repair_space>%s" , channel , ManagementRequest . this ) ; channel . executeRequest ( ManagementRequest . this , new DelegatingResponseHandler ( channelStrategy ) ) ; } catch ( Exception e ) { log . tracef ( e , "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>channel<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>%s,<seq2seq4repair_space>failing<seq2seq4repair_space>%s" , ManagementRequest . this , future ) ; future . failed ( e ) ; } } } ) ; return future ; } void writeRequest ( ProtocolChannel channel , FlushableDataOutput output ) throws IOException { } public T executeForResult ( final ExecutorService executor , final ManagementClientChannelStrategy channelStrategy ) throws Exception { } protected void writeRequest ( final int protocolVersion , final FlushableDataOutput output ) throws IOException { } protected CloseHandler < Channel > getRequestCloseHandler ( ) { } private final class DelegatingResponseHandler extends ManagementResponseHandler < T > { private final ManagementClientChannelStrategy clientChannelStrategy ; public DelegatingResponseHandler ( ManagementClientChannelStrategy clientChannelStrategy ) { } @ Override protected T readResponse ( DataInput input ) { } } protected void setError ( Exception e ) { } static class ManagementFuture < T > extends AsyncFutureTask < T > { protected ManagementFuture ( ) { } void done ( T result ) { } void failed ( Exception ex ) { } } }

Fix:
log . tracef ( "Scheduling<seq2seq4repair_space>request<seq2seq4repair_space>%s<seq2seq4repair_space>with<seq2seq4repair_space>future<seq2seq4repair_space>%s" , this , this ) ;
Buggy code:
public class XtendFacade { private ExecutionContext ctx ; private XtendFacade ( final ExecutionContext ctx ) { } public final XtendFacade cloneWithExtensions ( String extensionCode ) { } public final void registerMetaModel ( final MetaModel mm ) { } private ExtensionFile parse ( final String extFile ) { } public static final XtendFacade create ( final String ... extFile ) { } public static final XtendFacade create ( ExecutionContext ctx , final String ... extFile ) { } public Object call ( final String ext , Object ... params ) { } public Object call ( final String ext , List < ? > params ) { } public boolean hasExtension ( final String ext , Object [ ] paramsArray ) { } public boolean hasExtension ( final String ext , List < ? > params ) { } public Type analyze ( final String string , Object [ ] objects , final Set < AnalysationIssue > issues ) { if ( objects == null ) { objects = new Object [ 0 ] ; } final Extension extension = ctx . getExtension ( string , objects ) ; final Type [ ] params = new Type [ objects . length ] ; for ( int i = 0 ; i < ( params . length ) ; i ++ ) { params [ i ] = ctx . getType ( objects [ i ] ) ; } <START_BUG> return extension . getReturnType ( params , ctx , issues ) ; <END_BUG> } }

Fix:
return ctx . getReturnType ( extension , params , issues ) ;
Buggy code:
public abstract class AbstractFileResolvingResource extends AbstractResource { @ Override public File getFile ( ) throws IOException { } @ Override protected File getFileForLastModifiedCheck ( ) throws IOException { } protected File getFile ( URI uri ) throws IOException { } @ Override public boolean exists ( ) { } @ Override public boolean isReadable ( ) { } @ Override <START_BUG> public int contentLength ( ) throws IOException { <END_BUG> URL url = getURL ( ) ; if ( ResourceUtils . isFileURL ( url ) ) { return super . contentLength ( ) ; } else { URLConnection con = url . openConnection ( ) ; con . setUseCaches ( false ) ; if ( con instanceof HttpURLConnection ) { ( ( HttpURLConnection ) ( con ) ) . setRequestMethod ( "HEAD" ) ; } return con . getContentLength ( ) ; } } @ Override public long lastModified ( ) throws IOException { } private static class VfsResourceDelegate { public static Resource getResource ( URL url ) throws IOException { } public static Resource getResource ( URI uri ) throws IOException { } } }

Fix:
public long contentLength ( ) throws IOException {
Buggy code:
public class TiramisuApplication extends Application { @ Override public void onCreate ( ) { Intent pubnubIntent ; super . onCreate ( ) ; AlarmManager alarmManager = ( ( AlarmManager ) ( getSystemService ( ALARM_SERVICE ) ) ) ; PendingIntent alarmIntent ; alarmIntent = PendingIntent . getBroadcast ( this , 0 , new Intent ( this , RemindSchedulerReceiver . class ) , 0 ) ; <START_BUG> alarmManager . setInexactRepeating ( ELAPSED_REALTIME , 0 , INTERVAL_HALF_HOUR , alarmIntent ) ; <END_BUG> pubnubIntent = new Intent ( getApplicationContext ( ) , SocketListenerService . class ) ; getApplicationContext ( ) . startService ( pubnubIntent ) ; } }

Fix:
alarmManager . setInexactRepeating ( ELAPSED_REALTIME , 0 , PULLER_PERIOD , alarmIntent ) ;
Buggy code:
public class HostShutdownHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "shutdown" ; private final DomainController domainController ; public HostShutdownHandler ( final DomainController domainController ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final boolean restart = ( operation . hasDefined ( RESTART ) ) ? operation . get ( RESTART ) . asBoolean ( ) : false ; context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( restart ) { <START_BUG> System . exit ( ( ( ExitCodes . HOST_CONTROLLER_ABORT_EXIT_CODE ) + 1 ) ) ; <END_BUG> } else { domainController . stopLocalHost ( ) ; } context . completeStep ( ) ; } } , RUNTIME ) ; context . completeStep ( ) ; } @ Override public ModelNode getModelDescription ( final Locale locale ) { } }

Fix:
System . exit ( RESTART_PROCESS_FROM_STARTUP_SCRIPT ) ;
Buggy code:
public class RuntimeMXBeanReadResourceHandler implements OperationStepHandler { public static final RuntimeMXBeanReadResourceHandler INSTANCE = new RuntimeMXBeanReadResourceHandler ( ) ; private RuntimeMXBeanReadResourceHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode result = context . getResult ( ) ; for ( String attribute : PlatformMBeanConstants . RUNTIME_READ_ATTRIBUTES ) { final ModelNode store = result . get ( attribute ) ; try { RuntimeMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( SecurityException ignored ) { } catch ( UnsupportedOperationException ignored ) { } } for ( String attribute : PlatformMBeanConstants . RUNTIME_METRICS ) { final ModelNode store = result . get ( attribute ) ; try { RuntimeMXBeanAttributeHandler . storeResult ( attribute , store ) ; } catch ( SecurityException ignored ) { } catch ( UnsupportedOperationException ignored ) { } } if ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) { final ModelNode store = result . get ( OBJECT_NAME ) ; RuntimeMXBeanAttributeHandler . storeResult ( OBJECT_NAME , store ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class StormExclamationLocal { public static final String topologyId = "Streaming<seq2seq4repair_space>Exclamation" ; public static void main ( final String [ ] args ) throws Exception { if ( ! ( ExclamationTopology . parseParameters ( args ) ) ) { return ; } final FlinkTopologyBuilder builder = ExclamationTopology . buildTopology ( ) ; final FlinkLocalCluster cluster = FlinkLocalCluster . getLocalCluster ( ) ; cluster . submitTopology ( StormExclamationLocal . topologyId , null , builder . createTopology ( ) ) ; <START_BUG> Utils . sleep ( ( 5 * 1000 ) ) ; <END_BUG> cluster . killTopology ( StormExclamationLocal . topologyId ) ; cluster . shutdown ( ) ; } }

Fix:
Utils . sleep ( ( 10 * 1000 ) ) ;
Buggy code:
@ Parameters ( hidden = true , separators = "=" , commandDescription = "Shows<seq2seq4repair_space>the<seq2seq4repair_space>current<seq2seq4repair_space>version<seq2seq4repair_space>of<seq2seq4repair_space>this<seq2seq4repair_space>tool" ) public class VersionCommand implements Command { @ Override public void execute ( ) throws Exception { <START_BUG> System . out . println ( "Walkmod<seq2seq4repair_space>version<seq2seq4repair_space>\"1.4\"" ) ; <END_BUG> System . out . println ( ( "Java<seq2seq4repair_space>version:<seq2seq4repair_space>" + ( System . getProperty ( "java.version" ) ) ) ) ; System . out . println ( ( "Java<seq2seq4repair_space>Home:<seq2seq4repair_space>" + ( System . getProperty ( "java.home" ) ) ) ) ; System . out . println ( ( ( ( "OS:<seq2seq4repair_space>" + ( System . getProperty ( "os.name" ) ) ) + ",<seq2seq4repair_space>Version:<seq2seq4repair_space>" ) + ( System . getProperty ( "os.version" ) ) ) ) ; } }

Fix:
System . out . println ( "Walkmod<seq2seq4repair_space>version<seq2seq4repair_space>\"2.0.1\"" ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { DrawerLayout mDrawerLayout ; NavigationView mNavigationView ; FragmentManager mFragmentManager ; FragmentTransaction mFragmentTransaction ; private CharSequence mTitle ; Toolbar mtoolbar ; boolean doubleback ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; mDrawerLayout = ( ( DrawerLayout ) ( findViewById ( drawerLayout ) ) ) ; mNavigationView = ( ( NavigationView ) ( findViewById ( slidingmenu ) ) ) ; mtoolbar = ( ( Toolbar ) ( findViewById ( toolbar ) ) ) ; mFragmentManager = getSupportFragmentManager ( ) ; mFragmentTransaction = mFragmentManager . beginTransaction ( ) ; mFragmentTransaction . replace ( containerView , new BerandaFragment ( ) ) . commit ( ) ; mNavigationView . setNavigationItemSelectedListener ( new NavigationView . OnNavigationItemSelectedListener ( ) { @ Override public boolean onNavigationItemSelected ( MenuItem menuItem ) { mDrawerLayout . closeDrawers ( ) ; if ( ( menuItem . getItemId ( ) ) == ( id . beranda ) ) { FragmentTransaction xfragmentTransaction = mFragmentManager . beginTransaction ( ) ; xfragmentTransaction . replace ( containerView , new BerandaFragment ( ) ) . commit ( ) ; mtoolbar . setTitle ( berandafragment ) ; } if ( ( menuItem . getItemId ( ) ) == ( id . panduan ) ) { FragmentTransaction fragmentTransaction = mFragmentManager . beginTransaction ( ) ; fragmentTransaction . replace ( containerView , new PanduanFragment ( ) ) . commit ( ) ; mtoolbar . setTitle ( panduanfragment ) ; } <START_BUG> if ( ( menuItem . getItemId ( ) ) == ( id . tentang ) ) { <END_BUG> FragmentTransaction fragmentTransaction = mFragmentManager . beginTransaction ( ) ; fragmentTransaction . replace ( containerView , new TentangFragment ( ) ) . commit ( ) ; mtoolbar . setTitle ( tentangfragment ) ; } if ( ( menuItem . getItemId ( ) ) == ( id . lokasi ) ) { FragmentTransaction fragmentTransaction = mFragmentManager . beginTransaction ( ) ; fragmentTransaction . replace ( containerView , new MapFragment ( ) ) . commit ( ) ; mtoolbar . setTitle ( lokasifragment ) ; } return false ; } } ) ; ActionBarDrawerToggle mDrawerToggle = new ActionBarDrawerToggle ( this , mDrawerLayout , mtoolbar , string . app_name , string . app_name ) ; mDrawerLayout . setDrawerListener ( mDrawerToggle ) ; mDrawerToggle . syncState ( ) ; } public void onBackPressed ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( menuItem . getItemId ( ) ) == ( id . informasi ) ) {
Buggy code:
public class Xpand3MigratedNodeParserTest extends AbstractXpand3NodeParserTest { public final void testSimple ( ) throws Exception { } public final void testSimple2 ( ) throws Exception { } public final void testIfExpression ( ) throws Exception { } public void testIfExpression2 ( ) throws Exception { } public final void testEscaped ( ) throws Exception { } public final void testNot ( ) throws Exception { } public final void testCast ( ) throws Exception { } public final void testGenericType ( ) throws Exception { } public final void testSwitch ( ) throws Exception { } public final void testChainExpression ( ) throws Exception { } public final void testPositionInfo ( ) throws Exception { } public final void testPositionInfo2 ( ) throws Exception { } public final void testPositionInfo3 ( ) throws Exception { } public final void testTypeLiterals ( ) throws Exception { } private CompositeNode parse ( String s ) throws Exception { ANTLRStringStream stream = new ANTLRStringStream ( s ) ; Xpand3NodeLexer lexer = new Xpand3NodeLexer ( stream ) ; CommonTokenStream tokenStream = new CommonTokenStream ( lexer ) ; Xpand3NodeParser xpand3NodeParser = new Xpand3NodeParser ( tokenStream ) ; <START_BUG> Node rootNode = xpand3NodeParser . test_expression ( ) ; <END_BUG> System . out . println ( NodeUtil . toString ( rootNode ) ) ; return ( ( CompositeNode ) ( rootNode ) ) ; } }

Fix:
Node rootNode = xpand3NodeParser . r_test_expression ( ) ;
Buggy code:
class ChangeLogParser { private static final int GET_FILE = 1 ; private static final int GET_DATE = 2 ; private static final int GET_COMMENT = 3 ; private static final int GET_REVISION = 4 ; private static final int GET_PREVIOUS_REV = 5 ; private static final SimpleDateFormat c_inputDate = new SimpleDateFormat ( "yyyy//MM//dd" ) ; private String m_file ; private String m_date ; private String m_author ; private String m_comment ; private String m_revision ; private String m_previousRevision ; private int m_status = ChangeLogParser . GET_FILE ; private final Hashtable m_entries = new Hashtable ( ) ; private final Properties m_userList ; public ChangeLogParser ( Properties userList ) { } CVSEntry [ ] getEntrySetAsArray ( ) { } public void stdout ( final String line ) { } private void processComment ( final String line ) { } private void processFile ( final String line ) { } private void processRevision ( final String line ) { } private void processDate ( final String line ) { } private void processGetPreviousRevision ( final String line ) { if ( ! ( line . startsWith ( "revision" ) ) ) { throw new IllegalStateException ( ( "Unexpected<seq2seq4repair_space>line<seq2seq4repair_space>from<seq2seq4repair_space>CVS:<seq2seq4repair_space>" + line ) ) ; } m_previousRevision = line . substring ( 9 ) ; saveEntry ( ) ; m_revision = m_previousRevision ; <START_BUG> m_status = ChangeLogParser . GET_COMMENT ; <END_BUG> } private void saveEntry ( ) { } private Date parseDate ( final String date ) { } }

Fix:
m_status = ChangeLogParser . GET_DATE ;
Buggy code:
public class HTTPSampleResult extends SampleResult { private static Logger log = LoggingManager . getLoggerForClass ( ) ; public HTTPSampleResult ( ) { } public HTTPSampleResult ( long elapsed ) { } public HTTPSampleResult ( HTTPSampleResult res ) { } private String method ; public void setHTTPMethod ( String method ) { } public String getHTTPMethod ( ) { } private String redirectLocation ; public void setRedirectLocation ( String redirectLocation ) { } public String getRedirectLocation ( ) { } public boolean isRedirect ( ) { <START_BUG> final String [ ] REDIRECT_CODES = new String [ ] { "301" , "302" , "303" , "304" } ; <END_BUG> String code = getResponseCode ( ) ; for ( int i = 0 ; i < ( REDIRECT_CODES . length ) ; i ++ ) { if ( REDIRECT_CODES [ i ] . equals ( code ) ) return true ; } return false ; } public String getSamplerData ( ) { } private String cookies = "" ; public String getCookies ( ) { } public void setCookies ( String string ) { } private String queryString = "" ; public String getQueryString ( ) { } public void setQueryString ( String string ) { } }

Fix:
final String [ ] REDIRECT_CODES = new String [ ] { "301" , "302" , "303" } ;
Buggy code:
public abstract class SDFCompilerTest extends BaseTestCase { @ Rule public TestName name = new TestName ( ) ; @ SuppressWarnings ( "deprecation" ) public DefintionWithContext parse ( File definitionFile , String mainModule , boolean autoinclude ) throws IOException { GlobalOptions globalOptions = new GlobalOptions ( ) ; context = new Context ( ) ; context . globalOptions = globalOptions ; Path testDir = Files . createTempDirectory ( "test" ) ; Path tempDir = Files . createTempDirectory ( "temp" ) ; File definitionDir = new File ( testDir . toAbsolutePath ( ) . toString ( ) ) ; File kompiledDir = new File ( definitionDir , "test-kompiled" ) ; context . globalOptions = globalOptions ; FileUtil fileUtil = new FileUtil ( tempDir . toFile ( ) , Providers . of ( definitionDir ) , definitionDir , Providers . of ( kompiledDir ) , globalOptions ) ; context . files = fileUtil ; String path = ( ( ( new File ( "..//k-distribution//target//release//k//lib//native//" ) . getAbsolutePath ( ) ) + "//" ) + ( OS . current ( ) . name ( ) . toLowerCase ( ) ) ) + "//" ; String nativeSDF2TableExecutable = path + ( OS . current ( ) . getNativeExecutable ( "sdf2table" ) ) ; Sdf2Table sdf2Table = new Sdf2Table ( Providers . of ( new ProcessBuilder ( ) ) , nativeSDF2TableExecutable ) ; KompileOptions kompileOptions = mock ( KompileOptions . class ) ; when ( kompileOptions . mainModule ( ) ) . thenReturn ( mainModule ) ; kompileOptions . global = globalOptions ; kompileOptions . transition = new ArrayList < String > ( ) ; kompileOptions . supercool = new ArrayList < String > ( ) ; kompileOptions . superheat = new ArrayList < String > ( ) ; context . kompileOptions = kompileOptions ; kompileOptions . experimental = new Experimental ( ) ; kompileOptions . experimental . legacyKast = false ; BinaryLoader binaryLoader = new BinaryLoader ( kem , null ) ; <START_BUG> Definition parsedKIL = new org . kframework . parser . DefinitionLoader ( new org . kframework . utils . Stopwatch ( globalOptions ) , binaryLoader , kem , new org . kframework . parser . generator . OuterParser ( globalOptions , autoinclude , "autoinclude-java.k" , fileUtil , kem ) , true , fileUtil , sdf2Table ) . parseDefinition ( definitionFile , mainModule , context ) ; <END_BUG> return new DefintionWithContext ( parsedKIL , context ) ; } }

Fix:
Definition parsedKIL = new org . kframework . parser . DefinitionLoader ( new org . kframework . utils . Stopwatch ( globalOptions ) , binaryLoader , kem , new org . kframework . parser . generator . OuterParser ( globalOptions , autoinclude , "autoinclude-java.k" , fileUtil , kem ) , autoinclude , fileUtil , sdf2Table ) . parseDefinition ( definitionFile , mainModule , context ) ;
Buggy code:
class Dirent { private int ino ; private int parentIno ; private int type ; private String name ; Dirent ( int ino , int parentIno , int type , String name ) { } int getIno ( ) { } int getParentIno ( ) { } int getType ( ) { } String getName ( ) { } @ Override public String toString ( ) { <START_BUG> return String . format ( "[%d]:<seq2seq4repair_space>%s" , ino , name ) ; <END_BUG> } }

Fix:
return String . format ( "[%d]:<seq2seq4repair_space>%s" , Integer . valueOf ( ino ) , name ) ;
Buggy code:
public class Piece implements Comparable < Piece > { private int uniqueID = 0 ; private int color = 0 ; private Rank rank = null ; private int value = 0 ; private Rank actingRankFleeLow = Rank . NIL ; private Rank actingRankFleeHigh = Rank . NIL ; private Rank actingRankChase = Rank . NIL ; private int index = 0 ; public int moves = 0 ; private static final int IS_SUSPECTED = 1 << 0 ; private static final int MAYBE_EIGHT = 1 << 1 ; private static final int IS_LESS = 1 << 2 ; private static final int IS_BLOCKER = 1 << 3 ; private static final int IS_KNOWN = 1 << 4 ; private static final int IS_SHOWN = 1 << 5 ; private int flags = 0 ; public Piece ( int c , Rank r ) { } public Piece ( Piece p ) { } public void copy ( Piece p ) { } public void clear ( ) { } public void setRank ( Rank r ) { } public void makeKnown ( ) { } public int getColor ( ) { } public Rank getApparentRank ( ) { } public Rank getRank ( ) { } public int getID ( ) { } public boolean isShown ( ) { } public void setShown ( boolean b ) { } public boolean isKnown ( ) { } public void setKnown ( boolean b ) { } public boolean hasMoved ( ) { } public void setMoved ( ) { } public void setAiValue ( int v ) { } public int aiValue ( ) { } public Rank getActingRankChase ( ) { } public void setActingRankChaseEqual ( Rank r ) { } public void setActingRankChaseLess ( Rank r ) { } public boolean isRankLess ( ) { } public Rank getActingRankFleeLow ( ) { } public Rank getActingRankFleeHigh ( ) { } public void setActingRankFlee ( Rank r ) { } public void clearActingRankFlee ( ) { } public boolean isSuspectedRank ( ) { } public void setSuspectedRank ( Rank r ) { } public void setBlocker ( boolean b ) { } public boolean isBlocker ( ) { } public void setMaybeEight ( boolean b ) { if ( b ) flags |= Piece . MAYBE_EIGHT ; else <START_BUG> flags &= Piece . MAYBE_EIGHT ; <END_BUG> } public boolean getMaybeEight ( ) { } public int getIndex ( ) { } public void setIndex ( int i ) { } public int compareTo ( Piece p ) { } public int getStateFlags ( ) { } public boolean equals ( Object p ) { } public int winFight ( Piece defender ) { } }

Fix:
flags &= ~ ( Piece . MAYBE_EIGHT ) ;
Buggy code:
public class CookieTest extends TestCase { private MockHttpApplication application ; private SignInPanel panel ; private Form form ; private Cookie cookieUsername ; private Cookie cookiePassword ; private Cookie [ ] cookies ; private HtmlPage page ; private HttpRequestCycle cycle ; public CookieTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockHttpApplication ( null ) ; final ApplicationSettings settings = application . getSettings ( ) ; application . getPages ( ) . setHomePage ( MockPage . class ) ; application . setupRequestAndResponse ( ) ; this . panel = new SignInPanel ( "panel" ) { public String signIn ( final String username , final String password ) { return null ; } } ; this . panel . setPersistent ( true ) ; this . form = ( ( Form ) ( panel . get ( "signInForm" ) ) ) ; <START_BUG> final ICrypt crypt = settings . getCryptInstance ( ) ; <END_BUG> final String encryptedPassword = crypt . encryptString ( "test" ) ; assertNotNull ( encryptedPassword ) ; this . cookieUsername = new Cookie ( "panel.signInForm.username" , "juergen" ) ; this . cookiePassword = new Cookie ( "panel.signInForm.password" , encryptedPassword ) ; this . cookies = new Cookie [ ] { cookieUsername , cookiePassword } ; application . getServletRequest ( ) . setCookies ( cookies ) ; cycle = new HttpRequestCycle ( application , application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; this . page = new MockPage ( null ) ; page . add ( this . panel ) ; HttpRequestCycle cycle = new HttpRequestCycle ( application , application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; application . getWicketSession ( ) . setRequestCycle ( cycle ) ; } public void testSetCookieOnForm ( ) throws IOException , ServletException { } public void testSetCookieOnPage ( ) throws IOException , ServletException { } public void testPersistCookieWithPersistenceDisabled ( ) throws IOException , ServletException { } public void testPersistCookie ( ) throws IOException , ServletException { } public void testRemoveFromPage ( ) throws IOException , ServletException { } }

Fix:
final ICrypt crypt = application . getCrypt ( ) ;