nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DeploymentRedeployHandler implements ModelQueryOperationHandler , DescriptionProvider { public static final String OPERATION_NAME = REDEPLOY ; public static final DeploymentRedeployHandler INSTANCE = new DeploymentRedeployHandler ( ) ; private DeploymentRedeployHandler ( ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public OperationResult execute ( OperationContext context , ModelNode operation , ResultHandler resultHandler ) throws OperationFailedException { ModelNode model = context . getSubModel ( ) ; ModelNode compensatingOp = Util . getEmptyOperation ( DeploymentRedeployHandler . OPERATION_NAME , operation . get ( OP_ADDR ) ) ; final String name = model . require ( NAME ) . asString ( ) ; final String runtimeName = model . require ( RUNTIME_NAME ) . asString ( ) ; final DeploymentHandlerUtil [ ] contents = AbstractDeploymentHandler . getContents ( model . require ( CONTENT ) ) ; <START_BUG> DeploymentHandlerUtil . redeploy ( context , name , runtimeName , resultHandler , contents ) ; <END_BUG> return new org . jboss . as . controller . BasicOperationResult ( compensatingOp ) ; } }

Fix:
DeploymentHandlerUtil . redeploy ( context , runtimeName , name , resultHandler , contents ) ;
Buggy code:
public class PublisherInterceptor extends AbstractLifecycleInterceptor { private static final Logger log = Logger . getLogger ( PublisherInterceptor . class ) ; PublisherInterceptor ( ) { } public void invoke ( int state , InvocationContext context ) { HttpMetadata metadata = context . getAttachment ( HttpMetadata . class ) ; if ( state == ( Bundle . STARTING ) ) { String servletName = metadata . getServletName ( ) ; try { PublisherInterceptor . log . info ( ( "Publish<seq2seq4repair_space>HttpMetadata:<seq2seq4repair_space>" + metadata ) ) ; Bundle bundle = context . getBundle ( ) ; Class < ? > servletClass = bundle . loadClass ( servletName ) ; HttpServlet servlet = ( ( HttpServlet ) ( servletClass . newInstance ( ) ) ) ; ClassLoader ctxLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; try { HttpService httpService = getHttpService ( context , true ) ; httpService . registerServlet ( "//example-interceptor//servlet" , servlet , null , null ) ; } finally { Thread . currentThread ( ) . setContextClassLoader ( ctxLoader ) ; } } catch ( RuntimeException rte ) { throw rte ; } catch ( Exception ex ) { throw new LifecycleInterceptorException ( ( "Cannot<seq2seq4repair_space>publish:<seq2seq4repair_space>" + servletName ) , ex ) ; } } else if ( state == ( Bundle . STOPPING ) ) { PublisherInterceptor . log . info ( ( "Unpublish<seq2seq4repair_space>HttpMetadata:<seq2seq4repair_space>" + metadata ) ) ; ClassLoader ctxLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; try { HttpService httpService = getHttpService ( context , false ) ; if ( httpService != null ) <START_BUG> httpService . unregister ( "//servlet" ) ; <END_BUG> } finally { Thread . currentThread ( ) . setContextClassLoader ( ctxLoader ) ; } } } private HttpService getHttpService ( InvocationContext context , boolean required ) { } }

Fix:
httpService . unregister ( "//example-interceptor//servlet" ) ;
Buggy code:
class GarbageCollectorMXBeanAttributeHandler extends AbstractPlatformMBeanAttributeHandler { static final GarbageCollectorMXBeanAttributeHandler INSTANCE = new GarbageCollectorMXBeanAttributeHandler ( ) ; private GarbageCollectorMXBeanAttributeHandler ( ) { } @ Override protected void executeReadAttribute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final String gcName = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) . getLastElement ( ) . getValue ( ) ; final String name = operation . require ( NAME ) . asString ( ) ; GarbageCollectorMXBean gcMBean = null ; for ( GarbageCollectorMXBean mbean : ManagementFactory . getGarbageCollectorMXBeans ( ) ) { if ( gcName . equals ( PlatformMBeanUtil . escapeMBeanName ( mbean . getName ( ) ) ) ) { gcMBean = mbean ; } } if ( gcMBean == null ) { throw ROOT_LOGGER . unknownGarbageCollector ( gcName ) ; } <START_BUG> if ( OBJECT_NAME . getName ( ) . equals ( name ) ) { <END_BUG> final String objName = PlatformMBeanUtil . getObjectNameStringWithNameKey ( ManagementFactory . GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE , gcName ) ; context . getResult ( ) . set ( objName ) ; } else if ( NAME . equals ( name ) ) { context . getResult ( ) . set ( PlatformMBeanUtil . escapeMBeanName ( gcMBean . getName ( ) ) ) ; } else if ( VALID . getName ( ) . equals ( name ) ) { context . getResult ( ) . set ( gcMBean . isValid ( ) ) ; } else if ( MEMORY_POOL_NAMES . equals ( name ) ) { final ModelNode result = context . getResult ( ) ; result . setEmptyList ( ) ; for ( String pool : gcMBean . getMemoryPoolNames ( ) ) { result . add ( PlatformMBeanUtil . escapeMBeanName ( pool ) ) ; } } else if ( COLLECTION_COUNT . equals ( name ) ) { context . getResult ( ) . set ( gcMBean . getCollectionCount ( ) ) ; } else if ( COLLECTION_TIME . equals ( name ) ) { context . getResult ( ) . set ( gcMBean . getCollectionTime ( ) ) ; } else if ( ( GARBAGE_COLLECTOR_READ_ATTRIBUTES . contains ( name ) ) || ( GARBAGE_COLLECTOR_METRICS . contains ( name ) ) ) { throw ROOT_LOGGER . badReadAttributeImpl ( name ) ; } else { throw unknownAttribute ( operation ) ; } } @ Override protected void executeWriteAttribute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } }

Fix:
if ( ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) && ( OBJECT_NAME . getName ( ) . equals ( name ) ) ) {
Buggy code:
public class IntegerDatatype implements Datatype { private final String datatypeName ; public IntegerDatatype ( String datatypeName ) { } @ Override public boolean isValid ( JsonNode value ) { <START_BUG> return ( value . isTextual ( ) ) && ( value . textValue ( ) . matches ( "^[-]?\\d+$" ) ) ; <END_BUG> } public String getName ( ) { } }

Fix:
return ( value . isTextual ( ) ) && ( value . textValue ( ) . matches ( "^-?[1-9][0-9]*|0$" ) ) ;
Buggy code:
public class WebRequestCycle extends RequestCycle { public static final String resourceReferencePrefix = "//resources//" ; private static final Log log = LogFactory . getLog ( WebRequestCycle . class ) ; public static final int PARSE_REQUEST_NO_MATCH = 0 ; public static final int PARSE_REQUEST_RETURNING_PAGE = 1 ; public static final int PARSE_REQUEST_RETURNING_STATIC_CONTENT = 2 ; public WebRequestCycle ( final WebSession session , final WebRequest request , final Response response ) { } public WebRequest getWebRequest ( ) { } public WebResponse getWebResponse ( ) { } public WebSession getWebSession ( ) { } protected final boolean parseRequest ( ) { } protected int doParseRequest ( ) { } protected void redirectTo ( final Page page ) throws ServletException { } protected StringBuffer urlPrefix ( ) { } private boolean bookmarkablePage ( ) { } private boolean callDispatchedComponentListener ( ) { } private boolean callComponentListener ( ) { } private boolean homePage ( ) { final String path = getWebRequest ( ) . getPath ( ) ; final String servletPath = getWebRequest ( ) . getServletPath ( ) ; <START_BUG> if ( ( Strings . isEmpty ( path ) ) || ( ( "//" . equals ( path ) ) && ( "" . equals ( servletPath ) ) ) ) { <END_BUG> try { Class homePage = application . getPages ( ) . getHomePage ( ) ; ApplicationPages . HomePageRenderStrategy homePageStrategy = application . getPages ( ) . getHomePageRenderStrategy ( ) ; if ( homePageStrategy == ( ApplicationPages . BOOKMARK_REDIRECT ) ) { setResponsePage ( homePage ) ; } else { Page newPage = newPage ( homePage ) ; if ( ( getResponsePage ( ) ) == null ) { if ( homePageStrategy == ( ApplicationPages . PAGE_REDIRECT ) ) { ApplicationSettings . RenderStrategy strategy = getSession ( ) . getApplication ( ) . getSettings ( ) . getRenderStrategy ( ) ; boolean issueRedirect = ( strategy == ( ApplicationSettings . REDIRECT_TO_RENDER ) ) || ( strategy == ( ApplicationSettings . REDIRECT_TO_BUFFER ) ) ; setRedirect ( issueRedirect ) ; } setResponsePage ( newPage ) ; } } setUpdateCluster ( true ) ; } catch ( WicketRuntimeException e ) { throw new WicketRuntimeException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>home<seq2seq4repair_space>page" , e ) ; } return true ; } return false ; } private void invokeInterface ( final Component component , final Method method ) { } private void invokeInterface ( final Page page , final String path , final String interfaceName ) { } private final Page newPage ( final Class pageClass ) { } private void onExpiredPage ( ) { } private boolean resourceReference ( ) { } private boolean staticContent ( ) { } }

Fix:
if ( ( Strings . isEmpty ( path ) ) || ( "//" . equals ( path ) ) ) {
Buggy code:
public class BuiltinTypeSystem implements TypeSystem { private static Map < String , DeclaredType > types = new HashMap < String , DeclaredType > ( ) ; public DeclaredType getBuiltinTypeForJavaClass ( Class < ? > cls ) { if ( List . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( LIST ) ; if ( Set . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( SET ) ; if ( Collection . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( COLLECTION ) ; if ( Map . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( MAP ) ; if ( CharSequence . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( STRING ) ; if ( ( cls == ( Boolean . class ) ) || ( cls == ( Boolean . TYPE ) ) ) return BuiltinTypeSystem . types . get ( BOOLEAN ) ; <START_BUG> if ( ( cls == ( Long . class ) ) || ( cls == ( Long . TYPE ) ) ) <END_BUG> return BuiltinTypeSystem . types . get ( INTEGER ) ; if ( ( cls == ( Double . class ) ) || ( cls == ( Double . TYPE ) ) ) return BuiltinTypeSystem . types . get ( REAL ) ; if ( Function . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( FUNCTION ) ; if ( BackendType . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( TYPE ) ; if ( Property . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( PROPERTY ) ; if ( StaticProperty . class . isAssignableFrom ( cls ) ) return BuiltinTypeSystem . types . get ( STATIC_PROPERTY ) ; if ( Object . class . equals ( cls ) ) return BuiltinTypeSystem . types . get ( OBJECT ) ; return null ; } public DeclaredFunction functionForName ( String name , AbstractTypeReference ... parameterTypes ) { } public void setTypeSystemFactory ( TypeSystemFactory tsf ) { } public DeclaredType typeForName ( String name ) { } }

Fix:
if ( ( ( ( cls == ( Long . class ) ) || ( cls == ( Long . TYPE ) ) ) || ( cls == ( Integer . TYPE ) ) ) || ( cls == ( Integer . class ) ) )
Buggy code:
public class AssertText implements Action { @ Override public Result execute ( String ... args ) { String text = args [ 0 ] ; <START_BUG> boolean found = solo . searchText ( text ) ; <END_BUG> boolean shouldBeFound = Boolean . parseBoolean ( args [ 1 ] ) ; if ( shouldBeFound && ( ! found ) ) { return new Result ( false , ( ( "Text'" + text ) + "'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; } else if ( ( ! shouldBeFound ) && found ) { return new Result ( false , ( ( "Text'" + text ) + "'<seq2seq4repair_space>was<seq2seq4repair_space>found" ) ) ; } else { return Result . successResult ( ) ; } } @ Override public String key ( ) { } }

Fix:
boolean found = solo . searchText ( text , true ) ;
Buggy code:
public class MVELExpressionEvaluator extends ExpressionEvaluator { private Object _compiledExpression = null ; @ Override public void init ( ) throws Exception { } public String evaluate ( Object information ) { <START_BUG> Object result = MVEL . executeExpression ( _compiledExpression , information ) ; <END_BUG> if ( result != null ) { return result . toString ( ) ; } return null ; } }

Fix:
Object result = MVEL . executeExpression ( _compiledExpression , information , new HashMap < String , Object > ( ) ) ;
Buggy code:
public class EndPointState { private static ICompactSerializer < EndPointState > serializer_ ; HeartBeatState hbState_ ; Map < String , ApplicationState > applicationState_ = new Hashtable < String , ApplicationState > ( ) ; long updateTimestamp_ ; boolean isAlive_ ; boolean isAGossiper_ ; public static ICompactSerializer < EndPointState > serializer ( ) { } EndPointState ( HeartBeatState hbState ) { } HeartBeatState getHeartBeatState ( ) { } synchronized void setHeartBeatState ( HeartBeatState hbState ) { } public ApplicationState getApplicationState ( String key ) { } public Map < String , ApplicationState > getApplicationStateMap ( ) { } void addApplicationState ( String key , ApplicationState appState ) { <START_BUG> assert ! ( StorageService . instance ( ) . isClientMode ( ) ) ; <END_BUG> applicationState_ . put ( key , appState ) ; } long getUpdateTimestamp ( ) { } synchronized void updateTimestamp ( ) { } public boolean isAlive ( ) { } synchronized void isAlive ( boolean value ) { } boolean isAGossiper ( ) { } synchronized void isAGossiper ( boolean value ) { } public List < Map . Entry < String , ApplicationState > > getSortedApplicationStates ( ) { } }

Fix:
assert ! ( instance . isClientMode ( ) ) ;
Buggy code:
public class NumbersLexicon extends Lexicon { @ Override public Logic getEntry ( final String word , final String pos , final Category category , final Coindexation coindexation , final Optional < CCGandSRLparse > parse , final int wordIndex ) { if ( ( category == ( Category . ADJECTIVE ) ) && ( pos . equals ( "CD" ) ) ) { <START_BUG> return LogicParser . fromString ( "#y#p#x.p(x)<seq2seq4repair_space>&<seq2seq4repair_space>eq(size(x),<seq2seq4repair_space>y)" , Category . valueOf ( "(N//N)//NP" ) ) . apply ( new edu . uw . easysrl . semantics . Constant ( getLemma ( word , pos , parse , wordIndex ) , SemanticType . makeFromCategory ( N ) ) ) ; <END_BUG> } return null ; } @ Override public boolean isMultiWordExpression ( final SyntaxTreeNode node ) { } }

Fix:
return LogicParser . fromString ( "#y#p#x.p(x)<seq2seq4repair_space>&<seq2seq4repair_space>eq(size(x),<seq2seq4repair_space>y)" , Category . valueOf ( "(N//N)//NP" ) ) . apply ( new edu . uw . easysrl . semantics . Constant ( getLemma ( word , pos , parse , wordIndex ) , SemanticType . makeFromCategory ( NP ) ) ) ;
Buggy code:
@ RestController ( "restQuoteController" ) @ RequestMapping ( "//api//v1//quote" ) public class QuoteController { @ Autowired QuoteService quoteService ; <START_BUG> @ RequestMapping ( value = "//random" , method = RequestMethod . GET , headers = "Accept:<seq2seq4repair_space>application//json" ) <END_BUG> public Quote getRandomQuote ( ) { return quoteService . getRandom ( ) ; } @ RequestMapping ( value = "//create" , method = RequestMethod . POST ) public void createQuote ( @ RequestParam String quote ) { } @ RequestMapping ( value = "//update//{id}" , method = RequestMethod . PUT ) public void updateQuoteById ( @ PathVariable int id , @ RequestParam String quote ) { } @ RequestMapping ( value = "//delete//{id}" , method = RequestMethod . DELETE ) public void deleteQuoteById ( @ PathVariable int id ) { } @ RequestMapping ( value = "//{id}" , method = RequestMethod . GET , headers = "Accept:<seq2seq4repair_space>application//json" ) public Quote getQuoteById ( @ PathVariable int id ) { } }

Fix:
@ RequestMapping ( value = "//random" , method = RequestMethod . GET )
Buggy code:
public class LoadMetricDefinition extends SimpleResourceDefinition { static final PathElement PATH = PathElement . pathElement ( LOAD_METRIC ) ; protected static final LoadMetricDefinition INSTANCE = new LoadMetricDefinition ( ) ; static final SimpleAttributeDefinition TYPE = SimpleAttributeDefinitionBuilder . create ( CommonAttributes . TYPE , STRING , false ) . setAllowExpression ( false ) . setRestartAllServices ( ) . setValidator ( new org . jboss . as . controller . operations . validation . EnumValidator < LoadMetricEnum > ( LoadMetricEnum . class , false , false ) ) . build ( ) ; static final SimpleAttributeDefinition WEIGHT = SimpleAttributeDefinitionBuilder . create ( CommonAttributes . WEIGHT , INT , true ) . setAllowExpression ( true ) . setRestartAllServices ( ) . setDefaultValue ( new org . jboss . dmr . ModelNode ( LoadMetric . DEFAULT_WEIGHT ) ) . build ( ) ; static final SimpleAttributeDefinition CAPACITY = SimpleAttributeDefinitionBuilder . create ( CommonAttributes . CAPACITY , DOUBLE , true ) . setAllowExpression ( true ) . setRestartAllServices ( ) . setDefaultValue ( new org . jboss . dmr . ModelNode ( LoadMetric . DEFAULT_CAPACITY ) ) . build ( ) ; static final PropertiesAttributeDefinition PROPERTY = new PropertiesAttributeDefinition . Builder ( CommonAttributes . PROPERTY , true ) . setAllowExpression ( true ) . setRestartAllServices ( ) . build ( ) ; static final AttributeDefinition [ ] ATTRIBUTES = new AttributeDefinition [ ] { LoadMetricDefinition . TYPE , LoadMetricDefinition . WEIGHT , LoadMetricDefinition . CAPACITY , LoadMetricDefinition . PROPERTY } ; static void buildTransformation ( ModelVersion version , ResourceTransformationDescriptionBuilder builder ) { <START_BUG> if ( VERSION_1_2_0 . requiresTransformation ( version ) ) { <END_BUG> builder . addChildResource ( LoadMetricDefinition . PATH ) . getAttributeBuilder ( ) . addRejectCheck ( SIMPLE_EXPRESSIONS , LoadMetricDefinition . TYPE , LoadMetricDefinition . WEIGHT , LoadMetricDefinition . CAPACITY , LoadMetricDefinition . PROPERTY ) . addRejectCheck ( CapacityCheckerAndConverter . INSTANCE , LoadMetricDefinition . CAPACITY ) . setValueConverter ( CapacityCheckerAndConverter . INSTANCE , LoadMetricDefinition . CAPACITY ) . addRejectCheck ( PropertyCheckerAndConverter . INSTANCE , LoadMetricDefinition . PROPERTY ) . setValueConverter ( PropertyCheckerAndConverter . INSTANCE , LoadMetricDefinition . PROPERTY ) . end ( ) ; } } private LoadMetricDefinition ( ) { } @ Override public void registerAttributes ( ManagementResourceRegistration resourceRegistration ) { } }

Fix:
if ( VERSION_1_3_0 . requiresTransformation ( version ) ) {
Buggy code:
@ Controller @ Log4j @ RequestMapping ( value = "//api//movie" , produces = MediaType . APPLICATION_JSON_VALUE ) public class MovieResource { @ Autowired private MovieLookup movieService ; @ RequestMapping ( value = "//title//{title}" , method = RequestMethod . GET ) public ResponseEntity < TitleResponse > getMovieByTitle ( @ PathVariable ( "title" ) String title ) { <START_BUG> TitleResponse omdbResponse = omdbResponse = movieService . getMovieByTitle ( title ) ; <END_BUG> return new ResponseEntity ( omdbResponse , HttpStatus . OK ) ; } @ RequestMapping ( value = "//title//{title}" , method = RequestMethod . GET , params = { "search" } ) public ResponseEntity < List < TitleSearchResponse > > searchMovieByTitle ( @ PathVariable ( "title" ) String title , @ RequestParam ( value = "search" , required = true ) String search ) { } }

Fix:
TitleResponse omdbResponse = movieService . getMovieByTitle ( title ) ;
Buggy code:
public class AspectJBuilder extends JavaBuilder implements ICompilerAdapterFactory { private BcelWeaver myWeaver = null ; private BcelWorld myBcelWorld = null ; private EclipseClassPathManager cpManager = null ; private AspectJBuilder . UnwovenResultCollector unwovenResultCollector = null ; private AspectJBuilder . OutputFileNameProvider fileNameProvider = null ; private boolean isBatchBuild = false ; protected IProject [ ] build ( int kind , Map ignored , IProgressMonitor monitor ) throws CoreException { } protected BatchImageBuilder getBatchImageBuilder ( ) { } protected IncrementalImageBuilder getIncrementalImageBuilder ( ) { } public ICompilerAdapter getAdapter ( Compiler forCompiler ) { } protected BuildNotifier createBuildNotifier ( IProgressMonitor monitor , IProject currentProject ) { } private void initWorldAndWeaver ( AjCompilerOptions options ) { cpManager = new EclipseClassPathManager ( nameEnvironment ) ; myBcelWorld = new BcelWorld ( cpManager , new AspectJBuilder . UnhandledMessageHandler ( getProject ( ) ) , null ) ; myBcelWorld . setBehaveInJava5Way ( options . behaveInJava5Way ) ; myBcelWorld . setXnoInline ( options . xNoInline ) ; myBcelWorld . setXlazyTjp ( options . xLazyThisJoinPoint ) ; myBcelWorld . setXHasMemberSupportEnabled ( options . xHasMember ) ; myBcelWorld . setPinpointMode ( options . xdevPinpoint ) ; setLintProperties ( myBcelWorld , options ) ; myWeaver = new BcelWeaver ( myBcelWorld ) ; <START_BUG> myWeaver . setReweavableMode ( options . xReweavable , options . xReweavableCompress ) ; <END_BUG> } private void setLintProperties ( BcelWorld world , AjCompilerOptions options ) { } private static class UnwovenResultCollector implements IIntermediateResultsRequestor { private Collection results = new ArrayList ( ) ; public void acceptResult ( InterimCompilationResult intRes ) { } public Collection getIntermediateResults ( ) { } } private static class UnhandledMessageHandler implements IMessageHandler { private IProject project ; public UnhandledMessageHandler ( IProject p ) { } public boolean handleMessage ( IMessage message ) throws AbortException { } public boolean isIgnoring ( Kind kind ) { } public void dontIgnore ( IMessage . Kind kind ) { } } private static class OutputFileNameProvider implements IOutputClassFileNameProvider { private IPath outputLocation ; public OutputFileNameProvider ( IProject p ) { } public String getOutputClassFileName ( char [ ] eclipseClassFileName , CompilationResult result ) { } } private static class NullBinarySourceProvider implements IBinarySourceProvider { public Map getBinarySourcesForThisWeave ( ) { } } }

Fix:
myWeaver . setReweavableMode ( options . xNotReweavable ) ;
Buggy code:
class QueryNodeODataWriter implements QueryNodeVisitor < QueryNode > { private StringBuilder mBuilder ; QueryNodeODataWriter ( ) { } private static String process ( String s ) { } private static String process ( Date date ) { <START_BUG> return ( "datetimeoffset'" + ( DateSerializer . serialize ( date ) ) ) + "'" ; <END_BUG> } private static String sanitize ( String s ) { } static String percentEncode ( String s ) { } static String percentEncode ( String s , String reserved ) { } private static void appendHex ( StringBuilder builder , String s ) { } private static void appendHex ( StringBuilder sb , byte b ) { } StringBuilder getBuilder ( ) { } @ Override public QueryNode visit ( ConstantNode node ) { } @ Override public QueryNode visit ( FieldNode node ) { } @ Override public QueryNode visit ( UnaryOperatorNode node ) { } @ Override public QueryNode visit ( BinaryOperatorNode node ) { } @ Override public QueryNode visit ( FunctionCallNode node ) { } }

Fix:
return ( "datetime'" + ( DateSerializer . serialize ( date ) ) ) + "'" ;
Buggy code:
public class Util { public static DecoratedKey dk ( String key ) { } public static Column column ( String name , String value , long timestamp ) { } public static Range range ( IPartitioner p , String left , String right ) { } public static void addMutation ( RowMutation rm , String columnFamilyName , String superColumnName , long columnName , String value , long timestamp ) { } public static byte [ ] getBytes ( long v ) { } public static RangeSliceReply getRangeSlice ( ColumnFamilyStore cfs ) throws IOException , InterruptedException , ExecutionException { } public static ColumnFamilyStore writeColumnFamily ( List < RowMutation > rms ) throws IOException , InterruptedException , ExecutionException { RowMutation first = rms . get ( 0 ) ; String tablename = first . getTable ( ) ; <START_BUG> String cfname = first . columnFamilyNames ( ) . iterator ( ) . next ( ) ; <END_BUG> Table table = Table . open ( tablename ) ; ColumnFamilyStore store = table . getColumnFamilyStore ( cfname ) ; for ( RowMutation rm : rms ) rm . apply ( ) ; store . forceBlockingFlush ( ) ; return store ; } public static ColumnFamily getColumnFamily ( Table table , DecoratedKey key , String cfName ) throws IOException { } }

Fix:
String cfname = first . getColumnFamilies ( ) . iterator ( ) . next ( ) . metadata ( ) . cfName ;
Buggy code:
public class SinglyLinkedList extends Structure < String > { final SinglyLinkedList . _Node head ; HashMap < String , Object > args ; String operation ; public SinglyLinkedList ( ) { } @ Override public String go ( ) { } private String add ( String value , Node position ) { SinglyLinkedList . _Node tmp = head ; <START_BUG> while ( ! ( tmp . data . equals ( position ) ) ) { <END_BUG> if ( ( tmp . next ) == null ) { tmp . next = new SinglyLinkedList . _Node ( new Node ( value ) , null ) ; return null ; } else tmp = tmp . next ; } tmp . next = new SinglyLinkedList . _Node ( new Node ( value ) , null ) ; return null ; } private String delete ( Node toDelete ) { } private class _Node { protected Node data ; protected SinglyLinkedList . _Node next ; protected _Node ( Node < String > data , SinglyLinkedList . _Node next ) { } } }

Fix:
while ( ( ( tmp . data ) != null ) && ( ! ( tmp . data . equals ( position ) ) ) ) {
Buggy code:
public final class MarkupParser { private static final Log log = LogFactory . getLog ( MarkupParser . class ) ; private String componentNameAttribute = ComponentTag . DEFAULT_COMPONENT_NAME_ATTRIBUTE ; private boolean stripComments ; private boolean compressWhitespace ; private boolean stripWicketTag ; private boolean stripWicketFromComponentTag = false ; private boolean automaticLinking = false ; private IXmlPullParser xmlParser = new XmlPullParser ( ) ; public MarkupParser ( final IXmlPullParser xmlParser , final String componentNameAttribute ) { } public MarkupParser ( final IXmlPullParser xmlParser ) { } public void configure ( ApplicationSettings settings ) { this . componentNameAttribute = settings . getComponentNameAttribute ( ) ; <START_BUG> this . stripWicketTag = settings . getStripWicketTag ( ) ; <END_BUG> this . stripComments = settings . getStripComments ( ) ; this . compressWhitespace = settings . getCompressWhitespace ( ) ; this . automaticLinking = settings . getAutomaticLinking ( ) ; this . stripWicketFromComponentTag = settings . getStripComponentNames ( ) ; } public String getEncoding ( ) { } public Markup readAndParse ( final IResource resource ) throws IOException , ParseException , ResourceNotFoundException { } Markup parse ( final String string ) throws ParseException { } private List parseMarkup ( ) throws ParseException { } }

Fix:
this . stripWicketTag = settings . getStripWicketTags ( ) ;
Buggy code:
public class PropertyColumn extends AbstractColumn { private static final long serialVersionUID = 1L ; private final String propertyExpression ; public PropertyColumn ( IModel displayModel , String sortProperty , String propertyExpression ) { } public PropertyColumn ( IModel displayModel , String propertyExpressions ) { } public void populateItem ( Item item , String componentId , IModel model ) { <START_BUG> item . add ( new wicket . markup . html . basic . Label ( item , componentId , createLabelModel ( model ) ) ) ; <END_BUG> } protected IModel createLabelModel ( IModel embeddedModel ) { } public String getPropertyExpression ( ) { } }

Fix:
new wicket . markup . html . basic . Label ( item , componentId , createLabelModel ( model ) ) ;
Buggy code:
public final class RecommenderJob extends AbstractJob { @ Override public int run ( String [ ] args ) throws IOException , ClassNotFoundException , InterruptedException { addInputOption ( ) ; addOutputOption ( ) ; addOption ( "recommenderClassName" , "r" , "Name<seq2seq4repair_space>of<seq2seq4repair_space>recommender<seq2seq4repair_space>class<seq2seq4repair_space>to<seq2seq4repair_space>instantiate" ) ; addOption ( "numRecommendations" , "n" , "Number<seq2seq4repair_space>of<seq2seq4repair_space>recommendations<seq2seq4repair_space>per<seq2seq4repair_space>user" , "10" ) ; addOption ( "usersFile" , "u" , "File<seq2seq4repair_space>of<seq2seq4repair_space>users<seq2seq4repair_space>to<seq2seq4repair_space>recommend<seq2seq4repair_space>for" , null ) ; Map < String , List < String > > parsedArgs = parseArguments ( args ) ; if ( parsedArgs == null ) { return - 1 ; } Path inputFile = getInputPath ( ) ; Path outputPath = getOutputPath ( ) ; <START_BUG> Path usersFile = ( hasOption ( "usersFile" ) ) ? inputFile : new Path ( getOption ( "usersFile" ) ) ; <END_BUG> String recommendClassName = getOption ( "recommenderClassName" ) ; int recommendationsPerUser = Integer . parseInt ( getOption ( "numRecommendations" ) ) ; Job job = prepareJob ( usersFile , outputPath , TextInputFormat . class , UserIDsMapper . class , VarLongWritable . class , NullWritable . class , RecommenderReducer . class , VarLongWritable . class , RecommendedItemsWritable . class , TextOutputFormat . class ) ; FileOutputFormat . setOutputCompressorClass ( job , GzipCodec . class ) ; Configuration jobConf = job . getConfiguration ( ) ; jobConf . set ( RECOMMENDER_CLASS_NAME , recommendClassName ) ; jobConf . setInt ( RECOMMENDATIONS_PER_USER , recommendationsPerUser ) ; jobConf . set ( DATA_MODEL_FILE , inputFile . toString ( ) ) ; boolean succeeded = job . waitForCompletion ( true ) ; return succeeded ? 0 : - 1 ; } public static void main ( String [ ] args ) throws Exception { } }

Fix:
Path usersFile = ( hasOption ( "usersFile" ) ) ? new Path ( getOption ( "usersFile" ) ) : inputFile ;
Buggy code:
public class AssumptionTest { public static class HasFailingAssumption { @ Test public void assumptionsFail ( ) { } } @ Test public void failedAssumptionsMeanIgnored ( ) { Result result = JUnitCore . runClasses ( AssumptionTest . HasFailingAssumption . class ) ; Assert . assertThat ( result . getRunCount ( ) , is ( 0 ) ) ; <START_BUG> Assert . assertThat ( result . getIgnoreCount ( ) , is ( 1 ) ) ; <END_BUG> Assert . assertThat ( result . getFailureCount ( ) , is ( 0 ) ) ; } public static class HasPassingAssumption { @ Test public void assumptionsFail ( ) { } } @ Test public void passingAssumptionsScootThrough ( ) { } @ Test ( expected = AssumptionViolatedException . class ) public void assumeThatWorks ( ) { } @ Test public void assumeThatPasses ( ) { } @ Test public void assumeThatPassesOnStrings ( ) { } @ Test ( expected = AssumptionViolatedException . class ) public void assumeNotNullThrowsException ( ) { } @ Test public void assumeNotNullPasses ( ) { } @ Test public void assumeNotNullIncludesParameterList ( ) { } @ Test public void assumeNoExceptionThrows ( ) { } private void assertCompletesNormally ( ) { } @ Test ( expected = AssumptionViolatedException . class ) public void assumeTrueWorks ( ) { } public static class HasFailingAssumeInBefore { @ Before public void checkForSomethingThatIsntThere ( ) { } @ Test public void failing ( ) { } } @ Test public void failingAssumptionInBeforePreventsTestRun ( ) { } public static class HasFailingAssumeInBeforeClass { @ BeforeClass public static void checkForSomethingThatIsntThere ( ) { } @ Test public void failing ( ) { } } @ Test public void failingAssumptionInBeforeClassIgnoresClass ( ) { } public static class AssumptionFailureInConstructor { public AssumptionFailureInConstructor ( ) { } @ Test public void shouldFail ( ) { } } @ Test public void failingAssumptionInConstructorIgnoresClass ( ) { } }

Fix:
Assert . assertThat ( result . getUnrunnableCount ( ) , is ( 1 ) ) ;
Buggy code:
public class MemoryPoolMXBeanResetPeakUsageHandler implements OperationStepHandler , DescriptionProvider { public static final MemoryPoolMXBeanResetPeakUsageHandler INSTANCE = new MemoryPoolMXBeanResetPeakUsageHandler ( ) ; private MemoryPoolMXBeanResetPeakUsageHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { <START_BUG> return PlatformMBeanDescriptions . getDescriptionOnlyOperation ( locale , ( ( PlatformMBeanConstants . MEMORY_POOL ) + ".reset-peak-usage" ) ) ; <END_BUG> } private MemoryPoolMXBean getMemoryPoolMXBean ( ModelNode operation ) throws OperationFailedException { } }

Fix:
return PlatformMBeanDescriptions . getDescriptionOnlyOperation ( locale , "reset-peak-usage" , MEMORY_POOL ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class HelloWorldServletTest { @ Deployment ( testable = false ) public static WebArchive create ( ) { } @ HostIp String hostIp ; @ Rule public TemporaryFolder folder = new TemporaryFolder ( ) ; @ Test public void should_parse_and_load_configuration_file ( @ ArquillianResource URL base ) throws IOException { URL obj = new URL ( base , "HelloWorld" ) ; HttpURLConnection con = ( ( HttpURLConnection ) ( obj . openConnection ( ) ) ) ; con . setRequestMethod ( "GET" ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( con . getInputStream ( ) ) ) ; String inputLine ; StringBuffer response = new StringBuffer ( ) ; while ( ( inputLine = in . readLine ( ) ) != null ) { response . append ( inputLine ) ; } in . close ( ) ; <START_BUG> assertThat ( response . toString ( ) , is ( "Hello<seq2seq4repair_space>World" ) ) ; <END_BUG> } @ Test public void should_get_running_logs ( @ ArquillianResource CubeController cubeController , @ ArquillianResource CubeID cubeID ) { } @ Test public void should_execute_top ( @ ArquillianResource CubeController cubeController , @ ArquillianResource CubeID cubeID ) { } @ Test public void should_get_changes_on_container ( @ ArquillianResource CubeController cubeController , @ ArquillianResource CubeID cubeID ) { } @ Test public void should_copy_files_from_container ( @ ArquillianResource CubeController cubeController , @ ArquillianResource CubeID cubeID ) throws IOException { } @ Test public void should_enrich_test_with_docker_client ( @ ArquillianResource CubeController cubeController ) { } @ Test public void should_enrich_test_with_docker_client ( @ ArquillianResource DockerClient dockerClient ) { } @ Test public void should_enrich_test_with_cube_id ( @ ArquillianResource CubeID cubeId ) { } @ Test public void should_enrich_test_with_host_ip ( ) { } @ Test public void should_enrich_test_method_with_host_ip ( @ HostIp String methodHostIp ) { } }

Fix:
assertThat ( response . toString ( ) , is ( "{<seq2seq4repair_space>\"status\":<seq2seq4repair_space>\"OK\"}" ) ) ;
Buggy code:
public class IndexArrayElement extends AbstractJsonObject { public int index ; public AbstractJsonObject parent ; public IndexArrayElement ( int index , AbstractJsonObject parent ) { } @ Override public double similarity ( IElement anotherElement ) { } @ Override public String getText ( ) { <START_BUG> return ( ( ( this . parent . getText ( ) ) + "<seq2seq4repair_space>-><seq2seq4repair_space>[" ) + ( this . index ) ) + "]" ; <END_BUG> } @ Override public int getMaxDependencies ( String dependencyID ) { } @ Override public int getMinDependencies ( String dependencyID ) { } }

Fix:
return ( ( ( this . parent . getText ( ) ) + "_[" ) + ( this . index ) ) + "]" ;
Buggy code:
public class SyncSearchEngineCommand extends FolderCommand { private LocalFolder parentFolder ; public SyncSearchEngineCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( WorkerStatusController worker ) throws Exception { parentFolder = ( ( LocalFolder ) ( ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getFolder ( ) ) ) ; <START_BUG> DefaultSearchEngine engine = parentFolder . getSearchEngineInstance ( ) ; <END_BUG> engine . sync ( ) ; } }

Fix:
DefaultSearchEngine engine = parentFolder . getSearchEngine ( ) ;
Buggy code:
@ Reversible public class AlternationRule extends Rule { private static final long serialVersionUID = 2L ; private class AlternationMatcher extends NonterminalMatcher { int index = 0 ; Matcher mostRecent = null ; public AlternationMatcher ( CharSequence cs , Integer offset , Map < Integer , CachedMatch > [ ] cache , Matcher master ) { } @ Override protected void fetchNext ( ) { } } protected final Rule [ ] alternates ; Map < String , Set < String > > tagMap ; protected Condition c ; public AlternationRule ( Label label , Rule [ ] alternates , Map < String , Set < String > > tagMap ) { } @ Override public Matcher matcher ( CharSequence cs , Integer offset , Map < Integer , CachedMatch > [ ] cache , Matcher master ) { } @ Override protected String uniqueId ( ) { } @ Override public String description ( boolean inBrackets ) { } @ Override public Set < Integer > study ( CharSequence s , Map < Integer , CachedMatch > [ ] cache , Set < Rule > studiedRules , GlobalState options ) { } @ Override public boolean zeroWidth ( ) { } @ Override public Rule shallowClone ( ) { } @ Override public Rule conditionalize ( Condition c , String id ) { if ( ( this . c ) == null ) { this . c = c ; this . condition = id ; } else { if ( ( this . c ) instanceof LogicalCondition ) { if ( ! ( ( ( LogicalCondition ) ( this . c ) ) . replace ( id , c ) ) ) <START_BUG> throw new GrammarException ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>defined<seq2seq4repair_space>" + id ) + "<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>condition" ) ) ; <END_BUG> } else if ( ( this . c ) instanceof LeafCondition ) { LeafCondition lc = ( ( LeafCondition ) ( this . c ) ) ; if ( lc . cnd . equals ( id ) ) this . c = c ; else throw new GrammarException ( ( ( ( "rule<seq2seq4repair_space>" + ( this ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>carry<seq2seq4repair_space>condition<seq2seq4repair_space>" ) + id ) ) ; } else throw new GrammarException ( ( ( "condition<seq2seq4repair_space>on<seq2seq4repair_space>rule<seq2seq4repair_space>" + ( this ) ) + "<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>redefined" ) ) ; } return this ; } @ Override public void addLabels ( Match match , Set < String > labels ) { } @ Override protected void setUid ( ) { } @ Override protected void setCacheIndex ( Map < String , Integer > uids ) { } @ Override protected int maxCacheIndex ( int currentMax , Set < Rule > visited ) { } @ Override protected void rules ( Map < String , Rule > map ) { } @ Override protected void fixAlternation ( ) { } }

Fix:
throw new GrammarException ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>define<seq2seq4repair_space>" + id ) + "<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>condition" ) ) ;
Buggy code:
public class RssFragment extends ListFragment implements SwipeRefreshLayout . OnRefreshListener { private MainActivity mActivity ; private RdfParserTask rdfTask ; private AtomParserTask atomTask ; private ArrayList < Item > mItems ; private String url ; private ListAdapter adapter ; private SwipeRefreshLayout mSwipeRefreshLayout ; public RssFragment ( ) { } public RssFragment ( String url ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mItems = new ArrayList ( ) ; adapter = new ListAdapter ( mActivity , mItems ) ; rdfTask = new RdfParserTask ( mActivity , this , adapter ) ; atomTask = new AtomParserTask ( mActivity , this , adapter ) ; if ( ( url ) == null ) { rdfTask . executeOnExecutor ( THREAD_POOL_EXECUTOR , MIND_MATOME ) ; } else if ( url . contains ( "atom" ) ) { switch ( url ) { case Content . PHILOSOPHY_NEWS : atomTask . executeOnExecutor ( THREAD_POOL_EXECUTOR , PHILOSOPHY_NEWS ) ; break ; } } else if ( url . contains ( ".rdf" ) ) { switch ( url ) { case Content . MIND_MATOME : rdfTask . executeOnExecutor ( THREAD_POOL_EXECUTOR , MIND_MATOME ) ; break ; case Content . ALFA_MOSAIC : rdfTask . executeOnExecutor ( THREAD_POOL_EXECUTOR , ALFA_MOSAIC ) ; break ; case Content . GAME_NEWS_JIN : rdfTask . executeOnExecutor ( THREAD_POOL_EXECUTOR , GAME_NEWS_JIN ) ; break ; case Content . BIP_BLOG : rdfTask . executeOnExecutor ( THREAD_POOL_EXECUTOR , BIP_BLOG ) ; break ; case Content . HACHIMA_BLOG : <START_BUG> rdfTask . executeOnExecutor ( THREAD_POOL_EXECUTOR , HACHIMA_BLOG ) ; <END_BUG> break ; } } } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onListItemClick ( ListView l , View v , int position , long id ) { } @ Override public void onRefresh ( ) { } }

Fix:
rdfTask . executeOnExecutor ( THREAD_POOL_EXECUTOR , BIP_BLOG ) ;
Buggy code:
public class SecurityDependencyProcessor implements DeploymentUnitProcessor { public static final ModuleIdentifier PICKETBOX_ID = ModuleIdentifier . create ( PICKETBOX . getName ( ) , PICKETBOX . getSlot ( ) ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , SecurityDependencyProcessor . PICKETBOX_ID , false , true , false ) ) ; <END_BUG> } public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , SecurityDependencyProcessor . PICKETBOX_ID , false , false , false ) ) ;
Buggy code:
public class DataSourceTestCase extends AbstractCliTestBase { private static String [ ] profileNames ; private static final String [ ] [ ] DS_PROPS = new String [ ] [ ] { new String [ ] { "idle-timeout-minutes" , "5" } } ; @ BeforeClass public static void before ( ) throws Exception { } @ AfterClass public static void after ( ) throws Exception { } @ Before public void init ( ) { } @ Test public void testDataSource ( ) throws Exception { } @ Test public void testXaDataSource ( ) throws Exception { } private void testAddDataSource ( ) throws Exception { } private void testRemoveDataSource ( ) throws Exception { } private void testModifyDataSource ( ) throws Exception { } private void testAddXaDataSource ( ) throws Exception { } private void testModifyXaDataSource ( ) throws Exception { } private void testRemoveXaDataSource ( ) throws Exception { cli . sendLine ( ( ( "xa-data-source<seq2seq4repair_space>remove<seq2seq4repair_space>--profile=" + ( DataSourceTestCase . profileNames [ 0 ] ) ) + "<seq2seq4repair_space>--jndi-name=java:jboss//datasources//TestXADS" ) ) ; cli . sendLine ( ( ( "cd<seq2seq4repair_space>//profile=" + ( DataSourceTestCase . profileNames [ 0 ] ) ) + "//subsystem=datasources//xa-data-source" ) ) ; cli . sendLine ( "ls" ) ; <START_BUG> String ls = cli . readAllUnformated ( WAIT_TIMEOUT , WAIT_LINETIMEOUT ) ; <END_BUG> assertFalse ( ls . contains ( "java:jboss//datasources//TestXADS" ) ) ; } }

Fix:
String ls = cli . readAllUnformated ( WAIT_LINETIMEOUT , WAIT_LINETIMEOUT ) ;
Buggy code:
@ Component public class Main { @ Autowired private PoiRepository repository ; @ Autowired private RestaurantRepository restRepository ; @ Autowired private HotelRepository hotRepository ; @ Autowired private GenericRequestService serviceRequest ; @ Autowired private Contact contact ; @ Autowired private Deal deal ; @ Autowired private HotelRating hotrat ; @ Autowired private RestaurantRating restrat ; @ Autowired private Service service ; @ Autowired private Policy policy ; @ Autowired private Position position ; @ Autowired private Hotel linked_poi ; @ Autowired private Hotel hot ; @ Autowired private Restaurant rest ; @ Autowired private GenericRequestRepository repoRequest ; @ Autowired private ServiceFacade serviceFacade ; @ Autowired private RestaurantRepositoryImpl impl ; public void start ( String [ ] args ) { contact . addTelephoneNumber ( "3333849629" ) ; contact . setEmail ( "aldobrrrr@gmail.com" ) ; contact . setWebsite ( "www.aldobrrrr.net" ) ; deal . setDescription ( "tutto<seq2seq4repair_space>scontato<seq2seq4repair_space>al<seq2seq4repair_space>20%!" ) ; deal . setPrice ( 22.12 ) ; hotrat . setCleaning ( 2 ) ; hotrat . setComfort ( 3 ) ; hotrat . setPosition ( 4 ) ; hotrat . setPriceQuality ( 5 ) ; hotrat . setReview ( 10 ) ; hotrat . setServices ( 1 ) ; hotrat . setStaff ( 2 ) ; hotrat . setValue ( 4 ) ; hotrat . setWifi ( 10 ) ; restrat . setReview ( 8 ) ; restrat . setValue ( 3 ) ; service . setDescription ( "campi<seq2seq4repair_space>da<seq2seq4repair_space>tennis<seq2seq4repair_space>per<seq2seq4repair_space>tutti!" ) ; service . setName ( "Tennis" ) ; policy . setDescription ( "non<seq2seq4repair_space>si<seq2seq4repair_space>fuma!" ) ; policy . setName ( "Fumo" ) ; position . setAddress ( "Via<seq2seq4repair_space>dei<seq2seq4repair_space>giornalisti<seq2seq4repair_space>16" ) ; position . setCity ( "Roma" ) ; position . setLatitude ( 43.3223 ) ; position . setLongitude ( 38.22314 ) ; position . setZipCode ( "00135" ) ; hot . setContact ( contact ) ; hot . setName ( "Aldobrrrr<seq2seq4repair_space>Hotel" ) ; hot . setOpeningTimes ( "24//24<seq2seq4repair_space>7//7" ) ; hot . setPosition ( position ) ; hot . setRating ( hotrat ) ; hot . setStars ( 5 ) ; hot . setUrl ( "www.hotel.it//aldobrrrrhotel" ) ; hot . addDeal ( deal ) ; hot . addPolicies ( policy ) ; hot . addServices ( service ) ; <START_BUG> rest . setAveragePrice ( "25" ) ; <END_BUG> rest . addCookingType ( "Italiana" ) ; rest . addCookingType ( "Messicana" ) ; rest . addPolicies ( policy ) ; rest . addServices ( service ) ; rest . setName ( "Ristorante<seq2seq4repair_space>da<seq2seq4repair_space>Aldobrrrr" ) ; rest . setOpeningTimes ( "lun-ven<seq2seq4repair_space>12:30-15:00<seq2seq4repair_space>19:00-23:00" ) ; rest . setPosition ( position ) ; rest . setRating ( restrat ) ; rest . setUrl ( "www.ristoranti.it//ristorantealdobrrrr" ) ; UpgradeRequest upgradeRequest = new UpgradeRequest ( "restaurant" , "lazio" , "roma" , "roma" , "DueSpaghiScannerWrapper" ) ; this . repository . deleteAll ( ) ; this . repoRequest . deleteAll ( ) ; } }

Fix:
rest . setAveragePrice ( 25 ) ;
Buggy code:
public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver { public ExpressionValueMethodArgumentResolver ( ConfigurableBeanFactory beanFactory ) { } public boolean supportsParameter ( MethodParameter parameter ) { } @ Override protected NamedValueInfo createNamedValueInfo ( MethodParameter parameter ) { } @ Override protected Object resolveName ( String name , MethodParameter parameter , NativeWebRequest webRequest ) throws Exception { } @ Override protected void handleMissingValue ( String name , MethodParameter parameter ) throws ServletException { <START_BUG> throw new UnsupportedOperationException ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>expect<seq2seq4repair_space>to<seq2seq4repair_space>handle<seq2seq4repair_space>a<seq2seq4repair_space>missing<seq2seq4repair_space>value:<seq2seq4repair_space>an<seq2seq4repair_space>@Value<seq2seq4repair_space>is<seq2seq4repair_space>never<seq2seq4repair_space>required" ) ; <END_BUG> } private static class ExpressionValueNamedValueInfo extends NamedValueInfo { private ExpressionValueNamedValueInfo ( Value annotation ) { } } }

Fix:
throw new UnsupportedOperationException ( ( "@Value<seq2seq4repair_space>is<seq2seq4repair_space>never<seq2seq4repair_space>required:<seq2seq4repair_space>" + ( parameter . getMethod ( ) ) ) ) ;