nus-yam/ex-repair huggingface dataset:
Buggy code:
public class LevelMatchFilter extends Filter { public static final String LEVEL_TO_MATCH_OPTION = "LevelToMatch" ; public static final String ACCEPT_ON_MATCH_OPTION = "AcceptOnMatch" ; boolean acceptOnMatch = true ; Level levelToMatch ; public void setLevelToMatch ( String level ) { } public String getLevelToMatch ( ) { } public void setAcceptOnMatch ( boolean acceptOnMatch ) { } public boolean getAcceptOnMatch ( ) { } public int decide ( LoggingEvent event ) { if ( ( this . levelToMatch ) == null ) { return Filter . NEUTRAL ; } boolean matchOccured = false ; <START_BUG> if ( ( this . levelToMatch ) == ( event . level ) ) { <END_BUG> matchOccured = true ; } if ( matchOccured ) { if ( this . acceptOnMatch ) return Filter . ACCEPT ; else return Filter . DENY ; } else { return Filter . NEUTRAL ; } } }

Fix:
if ( this . levelToMatch . equals ( event . level ) ) {
Buggy code:
final class Activity implements IActivity { private static final int HASH_FACTOR = 89 ; private static final int HASH_INITIAL = Activity . class . getName ( ) . hashCode ( ) ; private boolean active ; private IActivityEvent activityEvent ; private List activityListeners ; private boolean defined ; private String description ; private boolean enabled ; private String id ; private String name ; private String parentId ; private List patternBindings ; private transient int hashCode ; private transient boolean hashCodeComputed ; private transient IPatternBinding [ ] patternBindingsAsArray ; private transient String string ; Activity ( String id ) { } public void addActivityListener ( IActivityListener activityListener ) { } public int compareTo ( Object object ) { } public boolean equals ( Object object ) { } public String getDescription ( ) throws ActivityNotDefinedException { } public String getId ( ) { } public String getName ( ) throws ActivityNotDefinedException { } public String getParentId ( ) throws ActivityNotDefinedException { } public List getPatternBindings ( ) { } public int hashCode ( ) { } public boolean isActive ( ) { } public boolean isDefined ( ) { } public boolean isEnabled ( ) { } public boolean match ( String string ) { } public void removeActivityListener ( IActivityListener activityListener ) { } public String toString ( ) { } void fireActivityChanged ( ) { if ( ( activityListeners ) != null ) { for ( int i = 0 ; i < ( activityListeners . size ( ) ) ; i ++ ) { if ( ( activityEvent ) == null ) <START_BUG> activityEvent = new ActivityEvent ( this ) ; <END_BUG> ( ( IActivityListener ) ( activityListeners . get ( i ) ) ) . activityChanged ( activityEvent ) ; } } } boolean setActive ( boolean active ) { } boolean setDefined ( boolean defined ) { } boolean setDescription ( String description ) { } boolean setEnabled ( boolean enabled ) { } boolean setName ( String name ) { } boolean setParentId ( String parentId ) { } boolean setPatternBindings ( List patternBindings ) { } }

Fix:
activityEvent = new ActivityEvent ( this , false , false , false , false , false , false , false ) ;
Buggy code:
public class ModClusterStopContext implements OperationStepHandler , DescriptionProvider { static final ModClusterStopContext INSTANCE = new ModClusterStopContext ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "stop-context:<seq2seq4repair_space>%s" , operation ) ; ContextHost contexthost = new ContextHost ( operation ) ; modcluster . stopContext ( contexthost . webhost , contexthost . webcontext , contexthost . waittime ) ; context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
public interface OrderService { boolean createOrder ( Map < String , Object > fieldMap , Multipart multipart ) { } boolean deleteOrder ( long id ) { } boolean updateOrder ( long id , Map < String , Object > fieldMap , Multipart multipart ) { } OrderInfo getOrder ( long id ) { } OrderInfo getOrder ( String code ) { } OrderBean getOrderBean ( long id ) { } Pager < OrderBean > getOrderBeanPager ( int pageNumber , int pageSize , String name , String product , String status , String orderby ) { } List < ProductType > getSubProductTypeList ( ) { } List < ProductTypeBean > getProductTypeList ( ) { } ProductType getProductType ( String id ) { } boolean saveProductType ( Map < String , Object > fieldMap ) { } List < SubOrder > getSubOrderList ( String code ) { } List < Tosection > getTosectionList ( String code ) { } <START_BUG> Object [ ] [ ] getChartInfo ( Map < String , Object > fieldMap ) ; <END_BUG> }

Fix:
Object [ ] getChartInfo ( Map < String , Object > fieldMap ) ;
Buggy code:
public class EjbInjectionSource extends InjectionSource { private final String beanName ; private final String typeName ; private volatile ServiceName resolvedViewName ; private volatile RemoteViewManagedReferenceFactory remoteFactory ; private volatile String error = null ; public EjbInjectionSource ( final String beanName , final String typeName ) { } public EjbInjectionSource ( final String typeName ) { } public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) throws DeploymentUnitProcessingException { } public void resolve ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final Set < ViewDescription > componentsForViewName = getViews ( phaseContext ) ; if ( componentsForViewName . isEmpty ( ) ) { error = ( ( "No<seq2seq4repair_space>component<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>type<seq2seq4repair_space>'" + ( typeName ) ) + "'<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>" ) + ( beanName ) ; return ; } if ( ( componentsForViewName . size ( ) ) > 1 ) { error = ( ( "More<seq2seq4repair_space>than<seq2seq4repair_space>1<seq2seq4repair_space>component<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>type<seq2seq4repair_space>'" + ( typeName ) ) + "'<seq2seq4repair_space>and<seq2seq4repair_space>bean<seq2seq4repair_space>name<seq2seq4repair_space>" ) + ( beanName ) ; return ; } ViewDescription description = componentsForViewName . iterator ( ) . next ( ) ; if ( description instanceof EJBViewDescription ) { final EJBViewDescription ejbViewDescription = ( ( EJBViewDescription ) ( description ) ) ; <START_BUG> if ( ( ejbViewDescription . getMethodIntf ( ) ) == ( MethodIntf . REMOTE ) ) { <END_BUG> final EJBComponentDescription componentDescription = ( ( EJBComponentDescription ) ( description . getComponentDescription ( ) ) ) ; final EEModuleDescription moduleDescription = componentDescription . getModuleDescription ( ) ; remoteFactory = new RemoteViewManagedReferenceFactory ( moduleDescription . getApplicationName ( ) , moduleDescription . getModuleName ( ) , moduleDescription . getDistinctName ( ) , componentDescription . getComponentName ( ) , description . getViewClassName ( ) , componentDescription . isStateful ( ) ) ; } } ServiceName serviceName = description . getServiceName ( ) ; resolvedViewName = serviceName ; } private Set < ViewDescription > getViews ( final DeploymentPhaseContext phaseContext ) { } public boolean equals ( Object o ) { } public int hashCode ( ) { } private static boolean eq ( Object a , Object b ) { } }

Fix:
if ( ( ( ejbViewDescription . getMethodIntf ( ) ) == ( MethodIntf . REMOTE ) ) || ( ( ejbViewDescription . getMethodIntf ( ) ) == ( MethodIntf . HOME ) ) ) {
Buggy code:
public class PerspectiveExtensionReader extends RegistryReader { private String targetID ; private PageLayout pageLayout ; private Set includeOnlyTags = null ; public static final String TAG_EXTENSION = "perspectiveExtension" ; public static final String TAG_ACTION_SET = "actionSet" ; public static final String TAG_WIZARD_SHORTCUT = "newWizardShortcut" ; public static final String TAG_VIEW_SHORTCUT = "viewShortcut" ; public static final String TAG_PERSP_SHORTCUT = "perspectiveShortcut" ; public static final String TAG_VIEW = "view" ; public static final String TAG_SHOW_IN_PART = "showInPart" ; private static final String ATT_ID = "id" ; private static final String ATT_TARGET_ID = "targetID" ; private static final String ATT_RELATIVE = "relative" ; private static final String ATT_RELATIONSHIP = "relationship" ; private static final String ATT_RATIO = "ratio" ; private static final String ATT_VISIBLE = "visible" ; private static final String VAL_LEFT = "left" ; private static final String VAL_RIGHT = "right" ; private static final String VAL_TOP = "top" ; private static final String VAL_BOTTOM = "bottom" ; private static final String VAL_STACK = "stack" ; private static final String VAL_FAST = "fast" ; private static final String VAL_FALSE = "false" ; public PerspectiveExtensionReader ( ) { } public void extendLayout ( String id , PageLayout out ) { targetID = id ; pageLayout = out ; <START_BUG> readRegistry ( Platform . getPluginRegistry ( ) , PLUGIN_ID , PL_PERSPECTIVE_EXTENSIONS ) ; <END_BUG> } private boolean includeTag ( String tag ) { } private boolean processActionSet ( IConfigurationElement element ) { } private boolean processExtension ( IConfigurationElement element ) { } private boolean processPerspectiveShortcut ( IConfigurationElement element ) { } private boolean processShowInPart ( IConfigurationElement element ) { } private boolean processView ( IConfigurationElement element ) { } private boolean processViewShortcut ( IConfigurationElement element ) { } private boolean processWizardShortcut ( IConfigurationElement element ) { } protected boolean readElement ( IConfigurationElement element ) { } public void setIncludeOnlyTags ( String [ ] tags ) { } }

Fix:
readRegistry ( Platform . getExtensionRegistry ( ) , PLUGIN_ID , PL_PERSPECTIVE_EXTENSIONS ) ;
Buggy code:
class MethodSignatureImpl extends CodeSignatureImpl implements MethodSignature { Class returnType ; MethodSignatureImpl ( int modifiers , String name , Class declaringType , Class [ ] parameterTypes , String [ ] parameterNames , Class [ ] exceptionTypes , Class returnType ) { } MethodSignatureImpl ( String stringRep ) { } public Class getReturnType ( ) { } String toString ( StringMaker sm ) { StringBuffer buf = new StringBuffer ( ) ; buf . append ( sm . makeModifiersString ( getModifiers ( ) ) ) ; if ( sm . includeArgs ) buf . append ( sm . makeTypeName ( getReturnType ( ) ) ) ; if ( sm . includeArgs ) buf . append ( "<seq2seq4repair_space>" ) ; <START_BUG> buf . append ( sm . makePrimaryTypeName ( getDeclaringType ( ) ) ) ; <END_BUG> buf . append ( "." ) ; buf . append ( getName ( ) ) ; sm . addSignature ( buf , getParameterTypes ( ) ) ; sm . addThrows ( buf , getExceptionTypes ( ) ) ; return buf . toString ( ) ; } }

Fix:
buf . append ( sm . makePrimaryTypeName ( getDeclaringType ( ) , getDeclaringTypeName ( ) ) ) ;
Buggy code:
public class CommandLineArgumentUsageImpl extends CommandLineArgumentUsage { public static void init ( ) { } public static void printUsage ( final PrintStream out ) { CommandLineArgumentUsageImpl . init ( ) ; <START_BUG> out . print ( usage ( ) ) ; <END_BUG> } }

Fix:
out . print ( usage ( "domain" ) ) ;
Buggy code:
public class GeneralTopologyContext implements JSONAware { private StormTopology _topology ; private Map < Integer , String > _taskToComponent ; private Map < String , List < Integer > > _componentToTasks ; private Map < String , Map < String , Fields > > _componentToStreamToFields ; private String _stormId ; protected Map _stormConf ; public GeneralTopologyContext ( StormTopology topology , Map stormConf , Map < Integer , String > taskToComponent , Map < String , List < Integer > > componentToSortedTasks , Map < String , Map < String , Fields > > componentToStreamToFields , String stormId ) { } public String getStormId ( ) { } public StormTopology getRawTopology ( ) { } public String getComponentId ( int taskId ) { <START_BUG> if ( taskId == ( - 1 ) ) { <END_BUG> return Constants . SYSTEM_COMPONENT_ID ; } else { return _taskToComponent . get ( taskId ) ; } } public Set < String > getComponentStreams ( String componentId ) { } public List < Integer > getComponentTasks ( String componentId ) { } public Fields getComponentOutputFields ( String componentId , String streamId ) { } public Fields getComponentOutputFields ( GlobalStreamId id ) { } public Map < GlobalStreamId , Grouping > getSources ( String componentId ) { } public Map < String , Map < String , Grouping > > getTargets ( String componentId ) { } @ Override public String toJSONString ( ) { } public Map < Integer , String > getTaskToComponent ( ) { } public Set < String > getComponentIds ( ) { } public ComponentCommon getComponentCommon ( String componentId ) { } public int maxTopologyMessageTimeout ( ) { } }

Fix:
if ( taskId == ( Constants . SYSTEM_TASK_ID ) ) {
Buggy code:
public class BayesParameters extends Parameters { public BayesParameters ( ) { } @ Deprecated public BayesParameters ( int gramSize ) { } public void setGramSize ( int gramSize ) { <START_BUG> set ( "gramSize" , Integer . toBinaryString ( gramSize ) ) ; <END_BUG> } public void setMinSupport ( int minSupport ) { } public void setMinDF ( int minDf ) { } public void setSkipCleanup ( boolean b ) { } }

Fix:
set ( "gramSize" , Integer . toString ( gramSize ) ) ;
Buggy code:
final class PackedWriter extends PackedInts . Writer { boolean finished ; final Format format ; final BulkOperation encoder ; final byte [ ] nextBlocks ; final long [ ] nextValues ; final int iterations ; int off ; int written ; PackedWriter ( PackedInts . Format format , DataOutput out , int valueCount , int bitsPerValue , int mem ) { } @ Override protected Format getFormat ( ) { } @ Override public void add ( long v ) throws IOException { <START_BUG> assert ( v >= 0 ) && ( v <= ( PackedInts . maxValue ( bitsPerValue ) ) ) ; <END_BUG> assert ! ( finished ) ; if ( ( ( valueCount ) != ( - 1 ) ) && ( ( written ) >= ( valueCount ) ) ) { throw new EOFException ( "Writing<seq2seq4repair_space>past<seq2seq4repair_space>end<seq2seq4repair_space>of<seq2seq4repair_space>stream" ) ; } nextValues [ ( ( off ) ++ ) ] = v ; if ( ( off ) == ( nextValues . length ) ) { flush ( ) ; } ++ ( written ) ; } @ Override public void finish ( ) throws IOException { } private void flush ( ) throws IOException { } @ Override public int ord ( ) { } }

Fix:
assert ( ( bitsPerValue ) == 64 ) || ( ( v >= 0 ) && ( v <= ( PackedInts . maxValue ( bitsPerValue ) ) ) ) : bitsPerValue ;
Buggy code:
public class EventGeneratorSource extends Source { class GenThread extends Thread { private Sink sink ; public GenThread ( ) throws IOException { } @ Override public void run ( ) { <START_BUG> while ( ( count . get ( ) ) <= ( max ) ) { <END_BUG> String str = new String ( ( ( "Event<seq2seq4repair_space>" + ( count . incrementAndGet ( ) ) ) + "<seq2seq4repair_space>" ) ) ; if ( ( str . length ( ) ) < ( length ) ) { str = str + ( StringUtils . repeat ( 'X' , ( ( length ) - ( str . length ( ) ) ) ) ) ; } try { this . sink . append ( new StringEvent ( str ) ) ; } catch ( IOException e ) { EventGeneratorSource . LOG . debug ( "Error<seq2seq4repair_space>appending" , e ) ; } try { Thread . sleep ( delay ) ; } catch ( InterruptedException e ) { break ; } } try { sink . close ( ) ; } catch ( IOException e1 ) { } } } private static final Logger LOG = LoggerFactory . getLogger ( EventGeneratorSource . class ) ; private static final int DEFAULT_MAX = 1000 ; private static final int DEFAULT_LENGTH = 32 ; private static final int DEFAULT_DELAY = 0 ; private final AtomicInteger count = new AtomicInteger ( ) ; private int max ; private int length ; private int delay ; private EventGeneratorSource . GenThread thread ; public EventGeneratorSource ( String [ ] args ) { } @ Override public void close ( ) throws IOException { } @ Override public Class < ? > getEventClass ( ) { } @ Override public void open ( ) throws IOException { } public boolean isFinished ( ) { } }

Fix:
while ( ( count . get ( ) ) < ( max ) ) {
Buggy code:
public class StressAsyncAppender extends Thread { static Category root = Category . getRoot ( ) ; static Random random = new Random ( 101 ) ; static final int LOOP_LENGTH = 24 ; static final int BRANCHING_FACTOR = 4 ; static int maxThreads ; static long msgCounter = 0 ; static int threadCounter = 0 ; static double LOG_2 = Math . log ( 2 ) ; static Object lock = new Object ( ) ; public static void main ( String [ ] args ) { if ( ( args . length ) != 1 ) { StressAsyncAppender . usage ( ) ; } <START_BUG> DOMConfigurator . configure ( "stressAsyncAppender.xml" ) ; <END_BUG> try { StressAsyncAppender . maxThreads = Integer . parseInt ( args [ 0 ] ) ; } catch ( NumberFormatException e ) { System . err . println ( e ) ; StressAsyncAppender . usage ( ) ; } while ( true ) { synchronized ( StressAsyncAppender . lock ) { StressAsyncAppender . createChildren ( ( ( StressAsyncAppender . randomInt ( StressAsyncAppender . BRANCHING_FACTOR ) ) + 1 ) ) ; try { StressAsyncAppender . root . debug ( "About<seq2seq4repair_space>to<seq2seq4repair_space>wait<seq2seq4repair_space>for<seq2seq4repair_space>notification." ) ; StressAsyncAppender . lock . wait ( ) ; StressAsyncAppender . root . debug ( "Got<seq2seq4repair_space>a<seq2seq4repair_space>notification." ) ; } catch ( InterruptedException e ) { StressAsyncAppender . root . warn ( "Unpextected<seq2seq4repair_space>InterruptedException<seq2seq4repair_space>received." , e ) ; } } } } static void usage ( ) { } public StressAsyncAppender ( ) { } public void run ( ) { } public static void createChildren ( int n ) { } public static int maxThreadsConstrained ( int a ) { } public static int randomInt ( int n ) { } public void delay ( long millis ) { } }

Fix:
DOMConfigurator . configure ( "xml//stressAsyncAppender.xml" ) ;
Buggy code:
public abstract class PatchOperationTarget { static final PathElement CORE_SERVICES = PathElement . pathElement ( CORE_SERVICE , "patching" ) ; public static final PatchOperationTarget createLocal ( final File jbossHome ) throws IOException { } public static final PatchOperationTarget createStandalone ( final ModelControllerClient controllerClient ) { } public static final PatchOperationTarget createHost ( final String hostName , final ModelControllerClient client ) { } protected abstract ModelNode info ( ) throws IOException ; protected abstract ModelNode applyPatch ( final File file , final ContentPolicyBuilderImpl builder ) throws IOException { } protected abstract ModelNode rollback ( final String patchId , final ContentPolicyBuilderImpl builder , boolean rollbackTo , final boolean restoreConfiguration ) throws IOException { } protected static class LocalPatchOperationTarget extends PatchOperationTarget { private final PatchTool tool ; public LocalPatchOperationTarget ( PatchTool tool ) { } @ Override protected ModelNode info ( ) throws IOException { final PatchInfo info = tool . getPatchInfo ( ) ; final ModelNode result = new ModelNode ( ) ; result . get ( OUTCOME ) . set ( SUCCESS ) ; <START_BUG> result . get ( RESULT , CUMULATIVE ) . set ( info . getCumulativeID ( ) ) ; <END_BUG> result . get ( RESULT , PATCHES ) . setEmptyList ( ) ; for ( final String patch : info . getPatchIDs ( ) ) { result . get ( RESULT , PATCHES ) . add ( patch ) ; } return result ; } @ Override protected ModelNode applyPatch ( final File file , final ContentPolicyBuilderImpl builder ) { } @ Override protected ModelNode rollback ( final String patchId , final ContentPolicyBuilderImpl builder , boolean rollbackTo , boolean restoreConfiguration ) { } } protected static class RemotePatchOperationTarget extends PatchOperationTarget { private final PathAddress address ; private final ModelControllerClient client ; public RemotePatchOperationTarget ( PathAddress address , ModelControllerClient client ) { } @ Override protected ModelNode info ( ) throws IOException { final ModelNode operation = new ModelNode ( ) ; operation . get ( OP ) . set ( READ_RESOURCE_OPERATION ) ; operation . get ( OP_ADDR ) . set ( address . toModelNode ( ) ) ; operation . get ( INCLUDE_RUNTIME ) . set ( true ) ; return client . execute ( operation ) ; } @ Override protected ModelNode applyPatch ( final File file , final ContentPolicyBuilderImpl policyBuilder ) throws IOException { } @ Override protected ModelNode rollback ( String patchId , ContentPolicyBuilderImpl builder , boolean rollbackTo , boolean restoreConfiguration ) throws IOException { } } static ModelNode formatFailedResponse ( final PatchingException e ) { } static ModelNode createOperation ( final String operationName , final ModelNode addr , final ContentPolicyBuilderImpl builder ) { } }

Fix:
result . get ( RESULT , RELEASE_PATCH_ID ) . set ( info . getReleasePatchID ( ) ) ;
Buggy code:
public class SpecialReviewHelper extends SpecialReviewHelperBase < InstitutionalProposalSpecialReview > { private static final long serialVersionUID = 6509860722698432447L ; private static final String PROTOCOL_INSTITUTIONAL_PROPOSAL_LINKING_ENABLED_PARAMETER = "irb.protocol.institute.proposal.linking.enabled" ; private static final String IACUC_PROTOCOL_INSTITUTIONAL_PROPOSAL_LINKING_ENABLED_PARAMETER = "iacuc.protocol.institute.proposal.linking.enabled" ; private InstitutionalProposalForm form ; public SpecialReviewHelper ( InstitutionalProposalForm form ) { } public void syncProtocolFundingSourcesWithSpecialReviews ( ) { } @ Override protected boolean hasModifySpecialReviewPermission ( String principalId ) { } @ Override protected boolean isIrbProtocolLinkingEnabledForModule ( ) { <START_BUG> return getParameterService ( ) . getParameterValueAsBoolean ( NAMESPACE_CODE , PARAMETER_CODE , SpecialReviewHelper . PROTOCOL_INSTITUTIONAL_PROPOSAL_LINKING_ENABLED_PARAMETER ) ; <END_BUG> } @ Override protected boolean isIacucProtocolLinkingEnabledForModule ( ) { } @ Override protected List < InstitutionalProposalSpecialReview > getSpecialReviews ( ) { } @ Override public boolean isCanCreateIrbProtocol ( ) { } @ Override public boolean isCanCreateIacucProtocol ( ) { } No newline ; at end ; of file ; }

Fix:
return getParameterService ( ) . getParameterValueAsBoolean ( MODULE_NAMESPACE_PROTOCOL , PARAMETER_CODE , SpecialReviewHelper . PROTOCOL_INSTITUTIONAL_PROPOSAL_LINKING_ENABLED_PARAMETER ) ;
Buggy code:
public class EclipseSourceType extends ResolvedTypeX . ConcreteName { protected ResolvedPointcutDefinition [ ] declaredPointcuts = null ; protected ResolvedMember [ ] declaredMethods = null ; protected ResolvedMember [ ] declaredFields = null ; public List declares = new ArrayList ( ) ; public List typeMungers = new ArrayList ( ) ; private EclipseFactory factory ; private SourceTypeBinding binding ; private TypeDeclaration declaration ; protected EclipseFactory eclipseWorld ( ) { } public EclipseSourceType ( ResolvedTypeX . Name resolvedTypeX , EclipseFactory factory , SourceTypeBinding binding , TypeDeclaration declaration ) { } public boolean isAspect ( ) { <START_BUG> return ( binding . scope . referenceContext ) instanceof AspectDeclaration ; <END_BUG> } public boolean isWovenBy ( ResolvedTypeX aspectType ) { } public ResolvedTypeX getSuperclass ( ) { } public ResolvedTypeX [ ] getDeclaredInterfaces ( ) { } protected void fillDeclaredMembers ( ) { } public ResolvedMember [ ] getDeclaredFields ( ) { } public ResolvedMember [ ] getDeclaredMethods ( ) { } public ResolvedMember [ ] getDeclaredPointcuts ( ) { } public int getModifiers ( ) { } public String toString ( ) { } public void checkPointcutDeclarations ( ) { } public boolean isInterface ( ) { } public PerClause getPerClause ( ) { } protected Collection getDeclares ( ) { } protected Collection getPrivilegedAccesses ( ) { } protected Collection getTypeMungers ( ) { } }

Fix:
return ( declaration ) instanceof AspectDeclaration ;
Buggy code:
public interface Mapper < S , T > { <START_BUG> Object map ( S source , T target ) ; <END_BUG> }

Fix:
T map ( S source , T target ) ;
Buggy code:
public class ColumbaMessage { protected ColumbaHeader columbaHeader ; protected Flags flags ; protected Message message ; protected MimePart bodyPart ; public ColumbaMessage ( ) { } public ColumbaMessage ( ColumbaHeader header ) { } public ColumbaMessage ( Message m ) { } public ColumbaMessage ( Header header ) { } public ColumbaMessage ( ColumbaHeader h , Message m ) { } public String getStringSource ( ) { } public void setStringSource ( String s ) { } public void setBodyPart ( MimePart body ) { } public void setUID ( Object o ) { if ( o != null ) { columbaHeader . set ( "columba.uid" , o ) ; } else { <START_BUG> columbaHeader . set ( "columba.uid" , new String ( "" ) ) ; <END_BUG> } } public Object getUID ( ) { } public MimeTree getMimePartTree ( ) { } public void setMimePartTree ( MimeTree ac ) { } public void freeMemory ( ) { } public ColumbaHeader getHeader ( ) { } public void setHeader ( ColumbaHeader h ) { } public MimePart getBodyPart ( ) { } public MimePart getMimePart ( int number ) { } public int getMimePartCount ( ) { } public Source getSource ( ) { } public void setHeader ( Header h ) { } public void setSource ( Source source ) { } public Flags getFlags ( ) { } }

Fix:
columbaHeader . set ( "columba.uid" , "" ) ;
Buggy code:
public class DbHandler { private static final String USER = "root" ; private static final String PWD = "tx$$c+EcH!" ; private static final String URL = "jdbc:derby:////localhost:1527//lid_DB" ; private ResultSet rs = null ; private Statement stmt = null ; private Properties properties = null ; private String select = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>" ; private String query = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>directory_structure" ; private String insert = "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>" ; private String insert2 = "<seq2seq4repair_space>(name,<seq2seq4repair_space>is_folder,<seq2seq4repair_space>hash)<seq2seq4repair_space>VALUES<seq2seq4repair_space>(" ; public DbHandler ( ) { } private void connect ( ) { try { <START_BUG> Class . forName ( "org.apache.derby.jdbc.ClientDriver" ) ; <END_BUG> Connection conn = DriverManager . getConnection ( DbHandler . URL , DbHandler . USER , DbHandler . PWD ) ; stmt = conn . createStatement ( ) ; } catch ( ClassNotFoundException ex ) { Logger . getLogger ( DbHandler . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } catch ( SQLException ex ) { Logger . getLogger ( DbHandler . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } public boolean insert ( String table , String name , String is_folder , String hash ) { } public List getAll ( String table ) { } public String getHashEntry ( String table , String name ) { } private List convertToList ( ) { } }

Fix:
Class . forName ( "org.apache.derby.jdbc.EmbeddedDriver" ) ;
Buggy code:
public class CounterMutationVerbHandler implements IVerbHandler { private static Logger logger = LoggerFactory . getLogger ( CounterMutationVerbHandler . class ) ; public void doVerb ( Message message ) { byte [ ] bytes = message . getMessageBody ( ) ; ByteArrayInputStream buffer = new ByteArrayInputStream ( bytes ) ; try { DataInputStream is = new DataInputStream ( buffer ) ; <START_BUG> CounterMutation cm = CounterMutation . serializer ( ) . deserialize ( is ) ; <END_BUG> if ( CounterMutationVerbHandler . logger . isDebugEnabled ( ) ) CounterMutationVerbHandler . logger . debug ( ( "Applying<seq2seq4repair_space>forwarded<seq2seq4repair_space>" + cm ) ) ; StorageProxy . applyCounterMutationOnLeader ( cm ) ; WriteResponse response = new WriteResponse ( cm . getTable ( ) , cm . key ( ) , true ) ; Message responseMessage = WriteResponse . makeWriteResponseMessage ( message , response ) ; MessagingService . instance ( ) . sendOneWay ( responseMessage , message . getFrom ( ) ) ; } catch ( UnavailableException e ) { } catch ( TimeoutException e ) { } catch ( IOException e ) { CounterMutationVerbHandler . logger . error ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>counter<seq2seq4repair_space>mutation" , e ) ; } } }

Fix:
CounterMutation cm = CounterMutation . serializer ( ) . deserialize ( is , message . getVersion ( ) ) ;
Buggy code:
public class WorkingSet implements IAdaptable , IPersistableElement , IWorkingSet { private static final String FACTORY_ID = "org.eclipse.ui.internal.WorkingSetFactory" ; private String name ; private ArrayList elements ; private String editPageId ; private IMemento workingSetMemento ; public WorkingSet ( String name , IAdaptable [ ] elements ) { } WorkingSet ( String name , IMemento memento ) { } public boolean equals ( Object object ) { } public Object getAdapter ( Class adapter ) { } public IAdaptable [ ] getElements ( ) { } private ArrayList getElementsArray ( ) { } public String getFactoryId ( ) { } public String getId ( ) { } public ImageDescriptor getImage ( ) { } public String getName ( ) { } public int hashCode ( ) { } private void restoreWorkingSet ( ) { IMemento [ ] itemMementos = workingSetMemento . getChildren ( TAG_ITEM ) ; Set items = new HashSet ( ) ; for ( int i = 0 ; i < ( itemMementos . length ) ; i ++ ) { IMemento itemMemento = itemMementos [ i ] ; String factoryID = itemMemento . getString ( TAG_FACTORY_ID ) ; if ( factoryID == null ) { WorkbenchPlugin . log ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>restore<seq2seq4repair_space>working<seq2seq4repair_space>set<seq2seq4repair_space>item<seq2seq4repair_space>-<seq2seq4repair_space>no<seq2seq4repair_space>factory<seq2seq4repair_space>ID." ) ; continue ; } <START_BUG> IElementFactory factory = WorkbenchPlugin . getDefault ( ) . getElementFactory ( factoryID ) ; <END_BUG> if ( factory == null ) { WorkbenchPlugin . log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>restore<seq2seq4repair_space>working<seq2seq4repair_space>set<seq2seq4repair_space>item<seq2seq4repair_space>-<seq2seq4repair_space>cannot<seq2seq4repair_space>instantiate<seq2seq4repair_space>factory:<seq2seq4repair_space>" + factoryID ) ) ; continue ; } IAdaptable item = factory . createElement ( itemMemento ) ; if ( item == null ) { WorkbenchPlugin . log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>restore<seq2seq4repair_space>working<seq2seq4repair_space>set<seq2seq4repair_space>item<seq2seq4repair_space>-<seq2seq4repair_space>cannot<seq2seq4repair_space>instantiate<seq2seq4repair_space>item:<seq2seq4repair_space>" + factoryID ) ) ; continue ; } items . add ( item ) ; } internalSetElements ( ( ( IAdaptable [ ] ) ( items . toArray ( new IAdaptable [ items . size ( ) ] ) ) ) ) ; } public void saveState ( IMemento memento ) { } public void setElements ( IAdaptable [ ] newElements ) { } private void internalSetElements ( IAdaptable [ ] newElements ) { } public void setId ( String pageId ) { } public void setName ( String newName ) { } }

Fix:
IElementFactory factory = PlatformUI . getWorkbench ( ) . getElementFactory ( factoryID ) ;
Buggy code:
@ RunWith ( Enclosed . class ) public class NodeServiceImplTest { public static class NodeOperations { Integer accountId = 1234 ; LoadBalancerRepository lbRepository ; NodeRepository nodeRepository ; NodeServiceImpl nodeService ; LoadBalancer lb ; LoadBalancer lb2 ; LoadBalancerJoinVip lbjv ; Set < LoadBalancerJoinVip > lbjvs ; VirtualIp vip ; Node node ; Node node2 ; Set < Node > nodes ; Set < Node > nodes2 ; @ Before public void standUp ( ) { } @ Before public void standUpObjects ( ) { } @ Test public void shouldReturnFalseWhenDuplicateNodesDetected ( ) throws EntityNotFoundException { } @ Test public void shouldReturnTrueWhenDuplicateNodesDetected ( ) throws EntityNotFoundException { node2 . setIpAddress ( "192.1.1.1" ) ; node2 . setPort ( 12 ) ; lb2 . getNodes ( ) . add ( node2 ) ; <START_BUG> Assert . assertTrue ( nodeService . detectDuplicateNodes ( lb , lb2 ) ) ; <END_BUG> } @ Test public void shouldAllowValidIps ( ) { } @ Test public void shouldNotAllowInvalidIps ( ) { } @ Test public void shouldReturnFalseIfLastActive ( ) { } @ Test public void shouldReturnTrueIfNotLastActive ( ) { } } }

Fix:
Assert . assertFalse ( nodeService . detectDuplicateNodes ( lb , lb2 ) ) ;
Buggy code:
public abstract class AbstractServerInModuleTestCase { protected static String serverDetails = "" ; static ServiceContainer container ; @ BeforeClass public static void startServer ( ) throws Exception { EmbeddedStandAloneServerFactory . setupCleanDirectories ( System . getProperties ( ) ) ; <START_BUG> ServerEnvironment serverEnvironment = Main . determineEnvironment ( new String [ 0 ] , new Properties ( System . getProperties ( ) ) , System . getenv ( ) ) ; <END_BUG> AbstractServerInModuleTestCase . serverDetails += "AS<seq2seq4repair_space>server<seq2seq4repair_space>details:<seq2seq4repair_space>" ; AbstractServerInModuleTestCase . serverDetails += "server<seq2seq4repair_space>homedir<seq2seq4repair_space>=<seq2seq4repair_space>" + ( serverEnvironment . getHomeDir ( ) ) ; AbstractServerInModuleTestCase . serverDetails += ",<seq2seq4repair_space>javaextdirs<seq2seq4repair_space>=<seq2seq4repair_space>" + ( serverEnvironment . getJavaExtDirs ( ) ) ; AbstractServerInModuleTestCase . serverDetails += ",<seq2seq4repair_space>modules_dir<seq2seq4repair_space>=<seq2seq4repair_space>" + ( serverEnvironment . getModulesDir ( ) ) ; AbstractServerInModuleTestCase . serverDetails += ",<seq2seq4repair_space>server_base<seq2seq4repair_space>=<seq2seq4repair_space>" + ( serverEnvironment . getServerBaseDir ( ) ) ; AbstractServerInModuleTestCase . serverDetails += ",<seq2seq4repair_space>server_config_dir<seq2seq4repair_space>=<seq2seq4repair_space>" + ( serverEnvironment . getServerConfigurationDir ( ) ) ; AbstractServerInModuleTestCase . serverDetails += ",<seq2seq4repair_space>server_config_file<seq2seq4repair_space>=<seq2seq4repair_space>" + ( serverEnvironment . getServerConfigurationFile ( ) ) ; Assert . assertNotNull ( serverEnvironment ) ; final Bootstrap bootstrap = Factory . newInstance ( ) ; final Bootstrap . Configuration configuration = new Bootstrap . Configuration ( ) ; configuration . setServerEnvironment ( serverEnvironment ) ; configuration . setModuleLoader ( Module . getBootModuleLoader ( ) ) ; configuration . setPortOffset ( 0 ) ; AbstractServerInModuleTestCase . container = bootstrap . startup ( configuration , Collections . < ServiceActivator > emptyList ( ) ) . get ( ) ; Assert . assertNotNull ( AbstractServerInModuleTestCase . serverDetails , AbstractServerInModuleTestCase . container ) ; } @ AfterClass public static void testServerStartupAndShutDown ( ) throws Exception { } public AbstractServerInModuleTestCase ( ) { } }

Fix:
ServerEnvironment serverEnvironment = Main . determineEnvironment ( new String [ 0 ] , new Properties ( System . getProperties ( ) ) , System . getenv ( ) , EMBEDDED ) ;
Buggy code:
public class AssemblerOperationsBlock { private final Block block ; private final ArrayList < AssemblerOperation > operations ; private final Set < AssemblerOperationsBlock > predecessors = new HashSet < > ( ) ; private final Set < AssemblerOperationsBlock > successors = new HashSet < > ( ) ; private final Set < VirtualRegister > uses = new HashSet < > ( ) ; private final Set < VirtualRegister > kills = new HashSet < > ( ) ; private final Set < VirtualRegister > liveIn = new HashSet < > ( ) ; private final Set < VirtualRegister > liveOut = new HashSet < > ( ) ; private final HashMap < VirtualRegister , AssemblerOperation > lastUsed = new HashMap < > ( ) ; public AssemblerOperationsBlock ( Block block , ArrayList < AssemblerOperation > operations ) { } public void calculateTree ( HashMap < Block , AssemblerOperationsBlock > operationsBlocks ) { } public void calculateUsesAndKills ( ) { uses . clear ( ) ; kills . clear ( ) ; lastUsed . clear ( ) ; for ( int i = ( operations . size ( ) ) - 1 ; i >= 0 ; i -- ) { AssemblerOperation operation = operations . get ( i ) ; for ( RegisterBased readRegisterBased : operation . getReadRegisters ( ) ) { VirtualRegister readRegister = ( ( VirtualRegister ) ( readRegisterBased ) ) ; uses . add ( readRegister ) ; <START_BUG> lastUsed . remove ( readRegister ) ; <END_BUG> lastUsed . put ( readRegister , operation ) ; readRegister . addUsage ( operation ) ; } for ( RegisterBased writeRegisterBased : operation . getWriteRegisters ( ) ) { VirtualRegister writeRegister = ( ( VirtualRegister ) ( writeRegisterBased ) ) ; kills . add ( writeRegister ) ; writeRegister . setDefinition ( operation ) ; } } } public Set < VirtualRegister > calculatePreallocatedRegisters ( ) { } public boolean calculateLiveInAndOut ( ) { } private void calculateLiveOut ( ) { } public Set < VirtualRegister > getLiveIn ( ) { } public Set < VirtualRegister > getLiveOut ( ) { } @ Override public String toString ( ) { } public Set < AssemblerOperationsBlock > getPredecessors ( ) { } public ArrayList < AssemblerOperation > getOperations ( ) { } public boolean isLastUsage ( VirtualRegister register , AssemblerOperation operation ) { } public boolean dominates ( AssemblerOperationsBlock otherBlock ) { } public boolean strictlyDominates ( AssemblerOperation operation1 , AssemblerOperation operation2 ) { } }

Fix:
if ( ! ( lastUsed . containsKey ( readRegister ) ) )
Buggy code:
public class EarInitializationProcessor implements DeploymentUnitProcessor { private static final String EAR_EXTENSION = ".ear" ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ResourceRoot resourceRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) ; final VirtualFile virtualFile = resourceRoot . getRoot ( ) ; <START_BUG> if ( virtualFile . getLowerCaseName ( ) . endsWith ( EarInitializationProcessor . EAR_EXTENSION ) ) { <END_BUG> DeploymentTypeMarker . setType ( EAR , deploymentUnit ) ; } } public void undeploy ( DeploymentUnit context ) { } }

Fix:
if ( virtualFile . getName ( ) . toLowerCase ( ) . endsWith ( EarInitializationProcessor . EAR_EXTENSION ) ) {
Buggy code:
public class ResolvedPointcutDefinition extends ResolvedMemberImpl { private Pointcut pointcut ; public ResolvedPointcutDefinition ( UnresolvedType declaringType , int modifiers , String name , UnresolvedType [ ] parameterTypes , Pointcut pointcut ) { } public ResolvedPointcutDefinition ( UnresolvedType declaringType , int modifiers , String name , UnresolvedType [ ] parameterTypes , UnresolvedType returnType , Pointcut pointcut ) { } public void write ( DataOutputStream s ) throws IOException { } public static ResolvedPointcutDefinition read ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public String toString ( ) { StringBuffer buf = new StringBuffer ( ) ; buf . append ( "pointcut<seq2seq4repair_space>" ) ; <START_BUG> buf . append ( getDeclaringType ( ) . getName ( ) ) ; <END_BUG> buf . append ( "." ) ; buf . append ( getName ( ) ) ; buf . append ( "(" ) ; for ( int i = 0 ; i < ( getParameterTypes ( ) . length ) ; i ++ ) { if ( i > 0 ) buf . append ( ",<seq2seq4repair_space>" ) ; buf . append ( getParameterTypes ( ) [ i ] . toString ( ) ) ; } buf . append ( ")" ) ; return buf . toString ( ) ; } public Pointcut getPointcut ( ) { } public boolean isAjSynthetic ( ) { } public ResolvedMemberImpl parameterizedWith ( UnresolvedType [ ] typeParameters , ResolvedType newDeclaringType , boolean isParameterized ) { } public static final ResolvedPointcutDefinition DUMMY = new ResolvedPointcutDefinition ( UnresolvedType . OBJECT , 0 , "missing" , UnresolvedType . NONE , Pointcut . makeMatchesNothing ( RESOLVED ) ) ; public void setPointcut ( Pointcut pointcut ) { } }

Fix:
buf . append ( ( ( getDeclaringType ( ) ) == null ? "<nullDeclaringType>" : getDeclaringType ( ) . getName ( ) ) ) ;
Buggy code:
class LocalOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final LocalOutboundConnectionAdd INSTANCE = new LocalOutboundConnectionAdd ( ) ; private LocalOutboundConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController installRuntimeService ( final OperationContext context , final ModelNode operation , final ModelNode fullModel , final ServiceVerificationHandler verificationHandler ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String connectionName = address . getLastElement ( ) . getValue ( ) ; final String outboundSocketBindingRef = OUTBOUND_SOCKET_BINDING_REF . resolveModelAttribute ( context , operation ) . asString ( ) ; final ServiceName outboundSocketBindingDependency = OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME . append ( outboundSocketBindingRef ) ; <START_BUG> final OptionMap connectionCreationOptions = ConnectorResource . getOptions ( context , fullModel . get ( PROPERTY ) ) ; <END_BUG> final LocalOutboundConnectionService outboundConnectionService = new LocalOutboundConnectionService ( connectionName , connectionCreationOptions ) ; final ServiceName serviceName = OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceName aliasServiceName = LOCAL_OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceBuilder < LocalOutboundConnectionService > svcBuilder = context . getServiceTarget ( ) . addService ( serviceName , outboundConnectionService ) . addAliases ( aliasServiceName ) . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , outboundConnectionService . getEndpointInjector ( ) ) . addDependency ( outboundSocketBindingDependency , OutboundSocketBinding . class , outboundConnectionService . getDestinationOutboundSocketBindingInjector ( ) ) ; if ( verificationHandler != null ) { svcBuilder . addListener ( verificationHandler ) ; } return svcBuilder . install ( ) ; } }

Fix:
final OptionMap connectionCreationOptions = ConnectorUtils . getOptions ( context , fullModel . get ( PROPERTY ) ) ;
Buggy code:
public class Property extends Task { protected String name ; protected String value ; protected File file ; protected String resource ; protected Path classpath ; protected String env ; protected Reference ref ; protected String prefix ; private Project fallback ; protected boolean userProperty ; public Property ( ) { } protected Property ( boolean userProperty ) { } protected Property ( boolean userProperty , Project fallback ) { } public void setName ( String name ) { } public String getName ( ) { } public void setLocation ( File location ) { } public void setValue ( String value ) { } public String getValue ( ) { } public void setFile ( File file ) { } public File getFile ( ) { } public void setPrefix ( String prefix ) { } public String getPrefix ( ) { } public void setRefid ( Reference ref ) { } public Reference getRefid ( ) { } public void setResource ( String resource ) { } public String getResource ( ) { } public void setEnvironment ( String env ) { } public String getEnvironment ( ) { } public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public Path getClasspath ( ) { } public void setUserProperty ( boolean userProperty ) { } public String toString ( ) { } public void execute ( ) throws BuildException { } protected void loadFile ( File file ) throws BuildException { } protected void loadResource ( String name ) { Properties props = new Properties ( ) ; log ( ( "Resource<seq2seq4repair_space>Loading<seq2seq4repair_space>" + name ) , MSG_VERBOSE ) ; InputStream is = null ; try { ClassLoader cL = null ; if ( ( classpath ) != null ) { <START_BUG> cL = new org . apache . tools . ant . AntClassLoader ( getProject ( ) , classpath ) ; <END_BUG> } else { cL = this . getClass ( ) . getClassLoader ( ) ; } if ( cL == null ) { is = ClassLoader . getSystemResourceAsStream ( name ) ; } else { is = cL . getResourceAsStream ( name ) ; } if ( is != null ) { props . load ( is ) ; addProperties ( props ) ; } else { log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>resource<seq2seq4repair_space>" + name ) , MSG_WARN ) ; } } catch ( IOException ex ) { throw new BuildException ( ex , getLocation ( ) ) ; } finally { if ( is != null ) { try { is . close ( ) ; } catch ( IOException e ) { } } } } protected void loadEnvironment ( String prefix ) { } protected void addProperties ( Properties props ) { } protected void addProperty ( String n , String v ) { } private void resolveAllProperties ( Properties props ) throws BuildException { } }

Fix:
cL = getProject ( ) . createClassLoader ( classpath ) ;
Buggy code:
public class FieldNotFoundResult implements BindingResult { private String fieldName ; private Object submittedValue ; private MessageSource messageSource ; public FieldNotFoundResult ( String fieldName , Object submittedValue , MessageSource messageSource ) { } public String getFieldName ( ) { } public Object getSubmittedValue ( ) { } public boolean isFailure ( ) { } public Alert getAlert ( ) { return new Alert ( ) { public String getCode ( ) { return "fieldNotFound" ; } public Severity getSeverity ( ) { return Severity . WARNING ; } public String getMessage ( ) { MessageBuilder builder = new MessageBuilder ( messageSource ) ; <START_BUG> builder . code ( "bindSuccess" ) ; <END_BUG> builder . arg ( "label" , new ResolvableArgument ( fieldName ) ) ; builder . arg ( "value" , submittedValue ) ; builder . defaultMessage ( new DefaultMessageFactory ( ) { public String createDefaultMessage ( ) { return ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>bind<seq2seq4repair_space>submitted<seq2seq4repair_space>value<seq2seq4repair_space>" + ( StylerUtils . style ( submittedValue ) ) ) + ";<seq2seq4repair_space>no<seq2seq4repair_space>field<seq2seq4repair_space>'" ) + ( fieldName ) ) + "'<seq2seq4repair_space>found" ; } } ) ; return builder . build ( ) ; } } ; } public String toString ( ) { } }

Fix:
builder . code ( getCode ( ) ) ;
Buggy code:
public class DefaultMarkupCacheKeyProvider implements IMarkupCacheKeyProvider { public DefaultMarkupCacheKeyProvider ( ) { } public String getCacheKey ( final MarkupContainer container , final Class < ? > clazz ) { final String classname = clazz . getName ( ) ; final Locale locale = container . getLocale ( ) ; final String style = ( ( container . getStyle ( ) ) + "_" ) + ( container . getVariation ( ) ) ; <START_BUG> final String markupType = container . getMarkupType ( ) ; <END_BUG> final AppendingStringBuffer buffer = new AppendingStringBuffer ( ( ( classname . length ( ) ) + 64 ) ) ; buffer . append ( classname ) ; if ( locale != null ) { final boolean l = ( locale . getLanguage ( ) . length ( ) ) != 0 ; final boolean c = ( locale . getCountry ( ) . length ( ) ) != 0 ; final boolean v = ( locale . getVariant ( ) . length ( ) ) != 0 ; buffer . append ( locale . getLanguage ( ) ) ; if ( c || ( l && v ) ) { buffer . append ( '_' ) . append ( locale . getCountry ( ) ) ; } if ( v && ( l || c ) ) { buffer . append ( '_' ) . append ( locale . getVariant ( ) ) ; } } if ( style != null ) { buffer . append ( style ) ; } buffer . append ( markupType ) ; return buffer . toString ( ) ; } }

Fix:
final String markupType = container . getMarkupType ( ) . getExtension ( ) ;