nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Service public class FinanceDepartmentImpl implements FinanceDepartment { @ Autowired private StationDao stationDao ; @ Autowired private AffilateDao affilateDao ; @ Autowired private PersonDao personDao ; @ Autowired private StationAffilate stationAffilate ; @ Autowired private ConversionService conversionService ; @ Autowired private Identification identification ; @ Override public Set < Person > getServiceStationEmployees ( Station serviceStation ) { } @ Override public Set < Person > getAffiliateMechanics ( Affilate affiliate ) { } @ Override public Set < Order > getServiceStationReadyOrders ( Station serviceStation , Calendar startDate , Calendar endDate ) { StationEntity stationEntity = stationDao . findById ( serviceStation . getStationId ( ) ) ; Set < Order > readyOrders = new HashSet < > ( ) ; for ( OrderEntity currentOrderEntity : stationEntity . getOrders ( ) . keySet ( ) ) <START_BUG> if ( ( ( currentOrderEntity . getStatus ( ) . equals ( READY ) ) && ( ( currentOrderEntity . getCompleteDate ( ) . compareTo ( startDate ) ) >= 0 ) ) && ( ( currentOrderEntity . getCompleteDate ( ) . compareTo ( endDate ) ) <= 0 ) ) <END_BUG> readyOrders . add ( conversionService . convert ( currentOrderEntity , Order . class ) ) ; return readyOrders ; } @ Override public Set < Order > getServiceStationOrders ( Station serviceStation , Calendar startDate , Calendar endDate ) { } @ Override public Set < Order > getAffiliateOrders ( Affilate affiliate , Calendar startDate , Calendar endDate ) { } @ Override public Set < Order > getAffiliateReadyOrders ( Affilate affiliate , Calendar startDate , Calendar endDate ) { } @ Override public Map < Calendar , Integer > getAffilateRent ( Affilate affilate , Calendar startDate , Calendar endDate ) { } @ Override public Map < Calendar , Integer > getEmployeeSalary ( Person employee , Calendar startDate , Calendar endDate ) { } }

Fix:
if ( ( ( ( currentOrderEntity . getStatus ( ) . equals ( READY ) ) && ( ( currentOrderEntity . getCompleteDate ( ) ) != null ) ) && ( ( currentOrderEntity . getCompleteDate ( ) . compareTo ( startDate ) ) >= 0 ) ) && ( ( currentOrderEntity . getCompleteDate ( ) . compareTo ( endDate ) ) <= 0 ) )
Buggy code:
public class BookmarkablePageLink extends Link < CharSequence > { private static final long serialVersionUID = 1L ; private final Class < ? extends Page > pageClass ; private String pageMapName = null ; private final PageParameters parameters ; public BookmarkablePageLink ( MarkupContainer parent , final String id , final Class < ? extends Page > pageClass ) { } public BookmarkablePageLink ( MarkupContainer parent , final String id , final Class < ? extends Page > pageClass , final PageParameters parameters ) { } public final Class < ? extends Page > getPageClass ( ) { } public final PageMap getPageMap ( ) { } @ Override public boolean linksTo ( final Page page ) { } @ Override protected boolean getStatelessHint ( ) { } @ Override public final void onClick ( ) { } public final BookmarkablePageLink setPageMap ( final PageMap pageMap ) { } public BookmarkablePageLink setParameter ( final String property , final int value ) { } public BookmarkablePageLink setParameter ( final String property , final long value ) { } public BookmarkablePageLink setParameter ( final String property , final String value ) { } @ Override protected CharSequence getURL ( ) { if ( ( ( pageMapName ) != null ) && ( ( getPopupSettings ( ) ) != null ) ) { throw new IllegalStateException ( "You<seq2seq4repair_space>cannot<seq2seq4repair_space>specify<seq2seq4repair_space>popup<seq2seq4repair_space>settings<seq2seq4repair_space>and<seq2seq4repair_space>a<seq2seq4repair_space>page<seq2seq4repair_space>map" ) ; } if ( ( getPopupSettings ( ) ) != null ) { <START_BUG> return urlFor ( getPopupSettings ( ) . getPageMap ( ) , pageClass , parameters ) ; <END_BUG> } else { return urlFor ( getPageMap ( ) , pageClass , parameters ) ; } } }

Fix:
return urlFor ( getPopupSettings ( ) . getPageMap ( this ) , pageClass , parameters ) ;
Buggy code:
public class AppModule { public static void contributeBeanValidatorSource ( OrderedConfiguration < BeanValidatorConfigurer > conf ) { } public static void bind ( ServiceBinder binder ) { } public static void contributeFactoryDefaults ( MappedConfiguration < String , Object > configuration ) { } public static void contributeValueEncoderSource ( MappedConfiguration < Class < ? > , ValueEncoderFactory < ? > > configuration ) { } public static void contributeApplicationDefaults ( MappedConfiguration < String , Object > configuration ) { configuration . add ( SUPPORTED_LOCALES , "de" ) ; <START_BUG> configuration . add ( HMAC_PASSPHRASE , "wepewpfvhzrtsydfhlae" ) ; <END_BUG> } public RequestExceptionHandler buildAppRequestExceptionHandler ( Logger logger , ResponseRenderer renderer , ComponentSource componentSource ) { } public void contributeServiceOverride ( MappedConfiguration < Class < ? > , Object > configuration , @ Local RequestExceptionHandler handler ) { } public void contributeMetaDataLocator ( MappedConfiguration < String , String > configuration ) { } public RequestFilter buildTimingFilter ( final Logger log ) { } public void contributeRequestHandler ( OrderedConfiguration < RequestFilter > configuration , @ Local RequestFilter filter ) { } }

Fix:
configuration . add ( "tapestry.hmac-passphrase" , "wepewpfvhzrtsydfhlae" ) ;
Buggy code:
public class StringLiteral extends Expression { public static final SimplePropertyDescriptor ESCAPED_VALUE_PROPERTY = new SimplePropertyDescriptor ( StringLiteral . class , "escapedValue" , String . class , ASTNode . MANDATORY ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private String escapedValue = "\"\"" ; StringLiteral ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final Object internalGetSetObjectProperty ( SimplePropertyDescriptor property , boolean get , Object value ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getEscapedValue ( ) { } public void setEscapedValue ( String token ) { } public String getLiteralValue ( ) { String s = getEscapedValue ( ) ; int len = s . length ( ) ; if ( ( ( len < 2 ) || ( ( s . charAt ( 0 ) ) != '\"' ) ) || ( ( s . charAt ( ( len - 1 ) ) ) != '\"' ) ) { throw new IllegalArgumentException ( ) ; } Scanner scanner = this . ast . scanner ; char [ ] source = s . toCharArray ( ) ; scanner . setSource ( source ) ; scanner . resetTo ( 0 , source . length ) ; try { int tokenType = scanner . getNextToken ( ) ; switch ( tokenType ) { case TerminalTokens . TokenNameStringLiteral : <START_BUG> return new String ( scanner . getCurrentTokenSourceString ( ) ) ; <END_BUG> default : throw new IllegalArgumentException ( ) ; } } catch ( InvalidInputException e ) { throw new IllegalArgumentException ( ) ; } } public void setLiteralValue ( String value ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
return scanner . getCurrentStringLiteral ( ) ;
Buggy code:
public class C { public static void main ( String [ ] args ) { for ( float i = - 1.0F ; i <= 1.0F ; i += 0.25F ) { <START_BUG> System . out . println ( ( ( i + "\t" ) + ( MathUtil . oldSam ( 0.3F , 0.65F , 1.0F , i ) ) ) ) ; <END_BUG> } } public static void out ( Object obj ) { } public static void err ( Object obj ) { } public static void log ( Object obj ) { } }

Fix:
System . out . println ( ( ( i + "\t" ) + ( MathUtil . zaeem ( 0.3F , 0.65F , 1.0F , i ) ) ) ) ;
Buggy code:
public class LiteralValueSource extends ValueSource { protected final String string ; protected final BytesRef bytesRef ; public LiteralValueSource ( String string ) { } public String getValue ( ) { } @ Override public DocValues getValues ( Map context , AtomicReaderContext readerContext ) throws IOException { return new StrDocValues ( this ) { @ Override public String strVal ( int doc ) { return string ; } @ Override public boolean bytesVal ( int doc , BytesRef target ) { <START_BUG> target . copy ( bytesRef ) ; <END_BUG> return true ; } @ Override public String toString ( int doc ) { return string ; } } ; } @ Override public String description ( ) { } @ Override public boolean equals ( Object o ) { } public static final int hash = LiteralValueSource . class . hashCode ( ) ; @ Override public int hashCode ( ) { } }

Fix:
target . copyBytes ( bytesRef ) ;
Buggy code:
public class LinksRunnable extends PostsRunnable < Link > { private Map < String , String > _forrstParams ; public LinksRunnable ( Context context , PostsHandler < Link > handler , List < Link > listOfPosts , Map < String , Bitmap > userIcons , Map < String , String > forrstParams ) { } public void run ( ) { try { JSONObject postsJSON = _forrst . postsList ( "link" , _forrstParams ) ; JSONArray postsJSONArray = ( ( JSONArray ) ( postsJSON . get ( "posts" ) ) ) ; for ( int count = 0 ; count < ( postsJSONArray . length ( ) ) ; count ++ ) { JSONObject json = postsJSONArray . getJSONObject ( count ) ; Map < String , String > properties = new HashMap < String , String > ( ) ; properties . put ( "id" , json . getString ( "id" ) ) ; properties . put ( "created_at" , getPostDate ( json ) ) ; properties . put ( "name" , json . getJSONObject ( "user" ) . getString ( "name" ) ) ; properties . put ( "title" , json . getString ( "title" ) ) ; properties . put ( "url" , json . getString ( "url" ) ) ; properties . put ( "content" , json . getString ( "content" ) ) ; properties . put ( "description" , json . getString ( "description" ) ) ; properties . put ( "view_count" , Integer . toString ( json . getInt ( "view_count" ) ) ) ; properties . put ( "like_count" , json . getString ( "like_count" ) ) ; properties . put ( "comment_count" , json . getString ( "comment_count" ) ) ; <START_BUG> properties . put ( "user_photos_thumb_url" , json . getJSONObject ( "user" ) . getJSONObject ( "photos" ) . getString ( "thumb_url" ) ) ; <END_BUG> Link link = ( ( Link ) ( new Link ( properties ) ) ) ; _listOfPosts . add ( link ) ; fetchUserIcon ( link ) ; } notifyHandler ( ) ; } catch ( JSONException e ) { throw new RuntimeException ( "Error<seq2seq4repair_space>fetching<seq2seq4repair_space>link<seq2seq4repair_space>from<seq2seq4repair_space>Forrst" , e ) ; } } No newline ; at end ; of file ; }

Fix:
properties . put ( "user_photos_thumb_url" , json . getJSONObject ( "user" ) . getJSONObject ( "photos" ) . getString ( "medium_url" ) ) ;
Buggy code:
public interface AnnotatedElement { <START_BUG> boolean hasAnnotation ( TypeX ofType ) ; <END_BUG> }

Fix:
boolean hasAnnotation ( ResolvedTypeX ofType ) ;
Buggy code:
public class GroupSector extends SpaceRegion implements Serializable { private static final long serialVersionUID = - 4269836844728197301L ; GroupSector ( ) { } public GroupSector ( String id ) { } public GroupSector ( SpaceRegion region ) { } public void removeChild ( SceneNode child ) { } public void addChild ( SceneNode region ) { if ( sons . contains ( region ) ) { return ; } if ( ( region . parent ) instanceof GroupSector ) { ( ( GroupSector ) ( region . parent ) ) . removeChild ( region ) ; } <START_BUG> region . localPosition . set ( region . localPosition . sub ( localPosition ) ) ; <END_BUG> region . parent = this ; sons . add ( region ) ; } public void clearMeshes ( ) { } public SpaceRegion pick ( Vec3 v ) { } private static void maxVec ( Vec3 v , float x , float y , float z ) { } private static void minVec ( Vec3 v , float x , float y , float z ) { } public static GroupSector getConvexHull ( GeneralTriangleMesh mesh ) { } public SceneNode getChild ( String query ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } public Collection < SceneNode > getSons ( ) { } public Material material ; public final GeneralTriangleMesh mesh = new GeneralTriangleMesh ( "_mesh" ) ; public final List < SceneNode > sons = new ArrayList < > ( ) ; }

Fix:
region . localPosition . set ( region . getAbsolutePosition ( ) . sub ( getAbsolutePosition ( ) ) ) ;
Buggy code:
public class ExecuteOn extends ExecTask { protected ArrayList filesets = new ArrayList ( ) ; private boolean relative = false ; private boolean parallel = false ; protected String type = "file" ; protected Marker srcFilePos = null ; private boolean skipEmpty = false ; protected Marker targetFilePos = null ; protected Mapper mapperElement = null ; protected FileNameMapper mapper = null ; protected File destDir = null ; protected boolean srcIsFirst = true ; public void setDest ( File destDir ) { } public void setParallel ( boolean parallel ) { } public void setRelative ( boolean relative ) { } public void setSkipEmptyFilesets ( boolean skip ) throws TaskException { } public void setType ( ExecuteOn . FileDirBoth type ) { } public void addFileset ( FileSet set ) { } public Mapper createMapper ( ) throws TaskException { if ( ( mapperElement ) != null ) { throw new TaskException ( "Cannot<seq2seq4repair_space>define<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>mapper" ) ; } <START_BUG> mapperElement = new Mapper ( getProject ( ) ) ; <END_BUG> return mapperElement ; } public Marker createSrcfile ( ) throws TaskException { } public Marker createTargetfile ( ) throws TaskException { } protected String [ ] getCommandline ( String [ ] srcFiles , File [ ] baseDirs ) throws TaskException { } protected String [ ] getCommandline ( String srcFile , File baseDir ) throws TaskException { } protected String [ ] getDirs ( File baseDir , DirectoryScanner ds ) throws TaskException { } protected String [ ] getFiles ( File baseDir , DirectoryScanner ds ) throws TaskException { } protected void checkConfiguration ( ) throws TaskException { } protected void runExec ( Execute exe ) throws TaskException { } public static class FileDirBoth extends EnumeratedAttribute { public String [ ] getValues ( ) { } } }

Fix:
mapperElement = new Mapper ( ) ;
Buggy code:
final class NotificationSession extends DispatchSession { private final ContactList list ; private ClientTicketRequest request ; private ResponseCommand response ; private Thread pingingThread ; private String alternateServer ; private String username ; NotificationSession ( MsnClient client ) { } boolean login ( String username , String password ) throws IOException { } private void retrieveBuddyList ( ) throws IOException { write ( "SYN" , "0<seq2seq4repair_space>0" ) ; <START_BUG> BufferedReader reader = new BufferedReader ( new InputStreamReader ( getInputStream ( ) ) ) ; <END_BUG> String input = reader . readLine ( ) ; while ( ( input == null ) || ( ! ( input . startsWith ( "SYN" ) ) ) ) { input = reader . readLine ( ) ; } String [ ] split = StringUtils . splitOnSpace ( input ) ; int contacts = Integer . parseInt ( split [ 4 ] ) ; while ( ! ( input . startsWith ( "LST" ) ) ) { if ( input . startsWith ( "PRP<seq2seq4repair_space>MFN" ) ) { client . internalSetDisplayName ( StringUtils . splitSubstring ( input , "<seq2seq4repair_space>" , 2 ) ) ; } else if ( input . startsWith ( "LSG" ) ) { split = StringUtils . splitOnSpace ( input ) ; list . addGroup ( split [ 2 ] , new Group ( URLDecoder . decode ( split [ 1 ] ) ) ) ; } input = reader . readLine ( ) ; } int count = 0 ; while ( true ) { if ( input . startsWith ( "LST" ) ) { count ++ ; String [ ] contact = StringUtils . splitOnSpace ( input ) ; String email = contact [ 1 ] . substring ( 2 ) ; switch ( contact . length ) { case 3 : list . internalAddContact ( email , email ) ; break ; case 5 : list . addContact ( email , email , contact [ 3 ] . substring ( 2 ) ) ; break ; default : list . addContact ( contact [ 2 ] . substring ( 2 ) , email , contact [ 3 ] . substring ( 2 ) , contact [ 5 ] ) ; break ; } if ( count == contacts ) { break ; } } input = reader . readLine ( ) ; } write ( "CHG" , ( ( client . getStatus ( ) . getLiteral ( ) ) + "<seq2seq4repair_space>268435488" ) ) ; idle ( ) ; ping ( ) ; } private void processSwitchboardRequest ( String [ ] data ) throws IOException { } ResponseCommand getChatSession ( ) throws IOException { } void reset ( ) throws IOException { } String read ( ) throws IOException { } void close ( ) { } private void ping ( ) { } private void processContactAdded ( String email , String contactName , String guid ) { } private void processContactRemoved ( String guid ) { } private void processContactAddedUser ( String email ) { } private void processContactRemovedUser ( String email ) { } private void processContactData ( String [ ] eventString , int index ) { } private void changeContactInfo ( String [ ] eventString ) { } private void setContactToOffline ( String eventString ) { } private void fireSwitchboardConnectedEvent ( ChatSession session ) { } public void addSessionListener ( ISessionListener listener ) { } public void removeSessionListener ( ISessionListener listener ) { } }

Fix:
BufferedReader reader = new BufferedReader ( new InputStreamReader ( getInputStream ( ) , "UTF-8" ) ) ;
Buggy code:
public class PlatformMBeanTestModelControllerService extends AbstractControllerService { private static final DescriptionProvider DESC_PROVIDER = new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { } } ; final CountDownLatch latch = new CountDownLatch ( 1 ) ; protected PlatformMBeanTestModelControllerService ( final ControlledProcessState processState ) { } @ Override protected void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration ) { GlobalOperationHandlers . registerGlobalOperations ( rootRegistration , processType ) ; <START_BUG> rootRegistration . registerOperationHandler ( OPERATION_NAME , INSTANCE , INSTANCE , false ) ; <END_BUG> PlatformMBeanResourceRegistrar . registerPlatformMBeanResources ( rootRegistration ) ; rootResource . registerChild ( ROOT_PATH , new RootPlatformMBeanResource ( ) ) ; } @ Override public void start ( StartContext context ) throws StartException { } }

Fix:
rootRegistration . registerOperationHandler ( DEFINITION , INSTANCE ) ;
Buggy code:
public class TestForTooMuchCloning extends LuceneTestCase { public void test ( ) throws Exception { <START_BUG> final MockDirectoryWrapper dir = newDirectory ( ) ; <END_BUG> final TieredMergePolicy tmp = new TieredMergePolicy ( ) ; tmp . setMaxMergeAtOnce ( 2 ) ; final RandomIndexWriter w = new RandomIndexWriter ( random ( ) , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMaxBufferedDocs ( 2 ) . setMergePolicy ( tmp ) ) ; final int numDocs = 20 ; for ( int docs = 0 ; docs < numDocs ; docs ++ ) { StringBuilder sb = new StringBuilder ( ) ; for ( int terms = 0 ; terms < 100 ; terms ++ ) { sb . append ( _TestUtil . randomRealisticUnicodeString ( random ( ) ) ) ; sb . append ( '<seq2seq4repair_space>' ) ; } final Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . TextField ( "field" , sb . toString ( ) , Store . NO ) ) ; w . addDocument ( doc ) ; } final IndexReader r = w . getReader ( ) ; w . close ( ) ; final int cloneCount = dir . getInputCloneCount ( ) ; assertTrue ( ( "too<seq2seq4repair_space>many<seq2seq4repair_space>calls<seq2seq4repair_space>to<seq2seq4repair_space>IndexInput.clone<seq2seq4repair_space>during<seq2seq4repair_space>merging:<seq2seq4repair_space>" + ( dir . getInputCloneCount ( ) ) ) , ( cloneCount < 500 ) ) ; final IndexSearcher s = new IndexSearcher ( r ) ; final TopDocs hits = s . search ( new org . apache . lucene . search . TermRangeQuery ( "field" , new BytesRef ( ) , new BytesRef ( "￿" ) , true , true ) , 10 ) ; assertTrue ( ( ( hits . totalHits ) > 0 ) ) ; final int queryCloneCount = ( dir . getInputCloneCount ( ) ) - cloneCount ; assertTrue ( ( "too<seq2seq4repair_space>many<seq2seq4repair_space>calls<seq2seq4repair_space>to<seq2seq4repair_space>IndexInput.clone<seq2seq4repair_space>during<seq2seq4repair_space>TermRangeQuery:<seq2seq4repair_space>" + queryCloneCount ) , ( queryCloneCount < 50 ) ) ; r . close ( ) ; dir . close ( ) ; } }

Fix:
final MockDirectoryWrapper dir = newMockDirectory ( ) ;
Buggy code:
public class HTTPSamplerFactory { public static final String HTTP_SAMPLER_JAVA = "HTTPSampler" ; public static final String HTTP_SAMPLER_APACHE = "HTTPSampler2" ; public static final String IMPL_HTTP_CLIENT4 = "HttpClient4" ; public static final String IMPL_HTTP_CLIENT3_1 = "HttpClient3.1" ; public static final String IMPL_JAVA = "Java" ; public static final String DEFAULT_CLASSNAME = JMeterUtils . getPropDefault ( "jmeter.httpsampler" , HTTPSamplerFactory . HTTP_SAMPLER_JAVA ) ; private HTTPSamplerFactory ( ) { } public static HTTPSamplerBase newInstance ( ) { } public static HTTPSamplerBase newInstance ( String alias ) { if ( ( alias . length ( ) ) == 0 ) { alias = HTTPSamplerFactory . DEFAULT_CLASSNAME ; } if ( ( alias . equals ( HTTPSamplerFactory . HTTP_SAMPLER_JAVA ) ) || ( alias . equals ( HTTPSamplerFactory . IMPL_JAVA ) ) ) { return new HTTPSamplerProxy ( HTTPSamplerFactory . IMPL_JAVA ) ; } if ( ( alias . equals ( HTTPSamplerFactory . HTTP_SAMPLER_APACHE ) ) || ( alias . equals ( HTTPSamplerFactory . IMPL_HTTP_CLIENT3_1 ) ) ) { return new HTTPSamplerProxy ( HTTPSamplerFactory . IMPL_HTTP_CLIENT3_1 ) ; } if ( alias . equals ( HTTPSamplerFactory . IMPL_HTTP_CLIENT4 ) ) { <START_BUG> return new HTTPSamplerProxy ( HTTPSamplerFactory . IMPL_HTTP_CLIENT3_1 ) ; <END_BUG> } throw new IllegalArgumentException ( ( ( "Unknown<seq2seq4repair_space>sampler<seq2seq4repair_space>type:<seq2seq4repair_space>'" + alias ) + "'" ) ) ; } public static String [ ] getImplementations ( ) { } public static HTTPAbstractImpl getImplementation ( String impl , HTTPSamplerBase base ) { } }

Fix:
return new HTTPSamplerProxy ( HTTPSamplerFactory . IMPL_HTTP_CLIENT4 ) ;
Buggy code:
public class RoboAppController extends Application implements ActivityMontitor { DataModel dataModel = new DataModel ( ) ; ServerController serverController ; private UpdatableActivity currentActiveActivity ; public DataModel getDataModel ( ) { } @ Override public void setActiveActivity ( UpdatableActivity activity ) { } @ Override public UpdatableActivity getActiveActivity ( ) { } public void handleClientInformationFromJson ( JSONArray jsonClientInfoArray ) throws JSONException { } private void handleSpeedFromJson ( JSONObject data ) throws JSONException { } private void handleJsonMessage ( JSONObject json ) { } public void playerNameEntered ( final String playerName , final OnFinishedCallback onFinishedCallback ) { <START_BUG> serverController = new ServerController ( "10.90.155.73" , "8888" ) ; <END_BUG> dataModel . addPlayerToArray ( playerName ) ; serverController . connect ( new WebSocketListener ( ) { @ Override public void connectionEstablished ( ) { serverController . sendMsg ( ( ( "{\"eventType\":<seq2seq4repair_space>\"connect\",<seq2seq4repair_space>\"data\":<seq2seq4repair_space>{\"clientType\":<seq2seq4repair_space>\"app\",<seq2seq4repair_space>\"name\":<seq2seq4repair_space>\"" + playerName ) + "\",<seq2seq4repair_space>\"ready\":<seq2seq4repair_space>\"false\"<seq2seq4repair_space>}}" ) ) ; onFinishedCallback . onFinished ( ) ; } @ Override public void connectionEstablishmentFailed ( String reason ) { onFinishedCallback . onFailed ( reason ) ; } @ Override public void messageReceived ( JSONObject message ) { handleJsonMessage ( message ) ; } @ Override public void connectionClosed ( String reason ) { } } ) ; } public void roboSelected ( String roboName ) { } public void steer ( SteeringDirection steeringDirection ) { } }

Fix:
serverController = new ServerController ( "10.0.2.1" , "8888" ) ;
Buggy code:
public class RecursiveDiscardAndRemoveTestCase { private static PathElement PATH = PathElement . pathElement ( "toto" , "testSubsystem" ) ; private static PathElement DISCARDED_WILDCARD = PathElement . pathElement ( "removeall" ) ; private static PathElement DISCARDED_WILDCARD_ENTRY = PathElement . pathElement ( "removeall" , "entry" ) ; private static PathElement DISCARDED_SPECIFIC = PathElement . pathElement ( "remove" , "one" ) ; private static PathElement DISCARDED_CHILD = PathElement . pathElement ( "child" , "one" ) ; private Resource resourceRoot = Factory . create ( ) ; private TransformerRegistry registry = TransformerRegistry . Factory . create ( null ) ; private ManagementResourceRegistration resourceRegistration = ManagementResourceRegistration . Factory . create ( RecursiveDiscardAndRemoveTestCase . ROOT ) ; private TransformersSubRegistration transformersSubRegistration ; private ModelNode resourceModel ; @ Before public void setUp ( ) { } @ Test public void testDiscardResource ( ) throws Exception { } @ Test public void testRejectResource ( ) throws Exception { } private void sanityTestNonDiscardedResource ( ) throws Exception { } private void discardResourceOperationsTest ( PathAddress pathAddress ) throws Exception { } private void rejectResourceOperationsTest ( PathAddress pathAddress ) throws Exception { } private Resource transformResource ( ) throws OperationFailedException { } private TransformedOperation transformOperation ( final ModelNode operation ) throws OperationFailedException { } private ResourceTransformationContext createContext ( final TransformationTarget target ) { <START_BUG> return Transformers . Factory . create ( target , resourceRoot , resourceRegistration , TEST_RESOLVER , NORMAL , STANDALONE_SERVER ) ; <END_BUG> } private Transformers getTransfomers ( final TransformationTarget target ) { } protected TransformationTarget create ( final TransformerRegistry registry , ModelVersion version ) { } protected TransformationTarget create ( final TransformerRegistry registry , ModelVersion version , TransformationTarget . TransformationTargetType type ) { } private static final ResourceDefinition ROOT = new org . jboss . as . controller . SimpleResourceDefinition ( PathElement . pathElement ( "test" ) , new NonResolvingResourceDescriptionResolver ( ) ) ; protected void assertRejected ( final ModelNode original , final TransformedOperation transformed ) { } private void assertDiscarded ( final TransformedOperation transformed ) { } private static final ModelNode success ( ) { } }

Fix:
return Transformers . Factory . create ( target , resourceRoot , resourceRegistration , DEFAULT , NORMAL , STANDALONE_SERVER ) ;
Buggy code:
public class dh256 { public static void main ( String [ ] args ) { } public static void join ( String [ ] args ) { } public static void insert ( String [ ] args ) { CommandLineParser clp = new CommandLineParser ( ) ; clp . setExecutableName ( "dh256<seq2seq4repair_space>insert" ) ; try { clp . addArgument ( new Argument ( ) . setLongOption ( "file" ) . setParam ( true ) . setMultipleAllowed ( false ) . setRequiredArg ( true ) ) ; clp . addArgument ( new Argument ( ) . setLongOption ( "bootstrap" ) . setOption ( "b" ) . setMultipleAllowed ( false ) . setTakesValue ( true ) . setHelpText ( "the<seq2seq4repair_space>bootstrap<seq2seq4repair_space>node." ) ) ; clp . addArgument ( new Argument ( ) . setLongOption ( "help" ) . setOption ( "h" ) . setMultipleAllowed ( false ) . setTakesValue ( false ) . setHelpText ( "Display<seq2seq4repair_space>help<seq2seq4repair_space>menue." ) ) ; Map < String , Argument > out = clp . parseArgs ( args ) ; if ( out . containsKey ( "help" ) ) { System . out . println ( clp . getHelpText ( ) ) ; } else { <START_BUG> File file = new File ( out . get ( "file" ) . getValue ( ) ) ; <END_BUG> if ( ! ( dh256 . existsAndReadable ( file ) ) ) { System . out . println ( "specified<seq2seq4repair_space>file<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist<seq2seq4repair_space>or<seq2seq4repair_space>we<seq2seq4repair_space>lack<seq2seq4repair_space>read<seq2seq4repair_space>permissions" ) ; return ; } Router router ; CASFileAddress fileAddress = new CASFileAddress ( file ) ; byte [ ] fileBytes = Files . readAllBytes ( file . toPath ( ) ) ; if ( out . containsKey ( "bootstrap" ) ) { String bootstrap = out . get ( "bootstrap" ) . getValues ( ) . get ( 0 ) ; String [ ] bootstrapSplit = bootstrap . split ( ":" ) ; L3Address a = new L3Address ( InetAddress . getByName ( bootstrapSplit [ 0 ] ) , Integer . parseInt ( bootstrapSplit [ 1 ] ) ) ; router = Router . fromBootstrapNode ( a ) ; } else { router = Router . fromDefaultLocalNode ( ) ; } int numberStored = router . put ( fileAddress , fileBytes ) ; if ( numberStored < 0 ) System . out . println ( ( ( ( "file<seq2seq4repair_space>added<seq2seq4repair_space>successfully<seq2seq4repair_space>by<seq2seq4repair_space>" + numberStored ) + "<seq2seq4repair_space>nodes<seq2seq4repair_space>with<seq2seq4repair_space>address:<seq2seq4repair_space>" ) + ( fileAddress . overlayAddressToString ( ) ) ) ) ; else System . out . println ( "the<seq2seq4repair_space>file<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>added" ) ; } } catch ( DuplicateOptionException e ) { DBP . printException ( e ) ; } catch ( InvalidFormatException e ) { System . out . println ( clp . getHelpText ( ) ) ; DBP . printException ( e ) ; } catch ( Exception e ) { DBP . printException ( e ) ; } } private static boolean existsAndReadable ( File f ) { } public static void retrieve ( String [ ] args ) { } public static void shutdown ( String [ ] args ) { } No newline ; at end ; of file ; }

Fix:
File file = new File ( out . get ( "file" ) . getValues ( ) . get ( 0 ) ) ;
Buggy code:
public class BubbleMain { private static final double NANOSECONDS_PER_SECOND = 1000000000 ; public static void main ( String [ ] args ) { System . out . println ( "Started<seq2seq4repair_space>loading." ) ; long startTime = System . nanoTime ( ) ; <START_BUG> InputStream is = BubbleMain . class . getClass ( ) . getResourceAsStream ( "//genomes//TB10.gfa" ) ; <END_BUG> NodeCollection nodeCollection = new SegmentParser ( ) . parse ( is ) ; long endTime = System . nanoTime ( ) ; System . out . println ( String . format ( "Loading<seq2seq4repair_space>time:<seq2seq4repair_space>%f<seq2seq4repair_space>s." , ( ( endTime - startTime ) // ( BubbleMain . NANOSECONDS_PER_SECOND ) ) ) ) ; BubbleDetector detector = new BubbleDetector ( nodeCollection ) ; detector . findMultiLevelBubbles ( ) ; for ( int i = 0 ; i < ( detector . getBubbleBoundaries ( ) . size ( ) ) ; i ++ ) { System . out . println ( ( ( ( ( ( ( ( "Id:<seq2seq4repair_space>" + ( detector . getBubbleBoundaries ( ) . get ( i ) . getId ( ) ) ) + "<seq2seq4repair_space>Bubble<seq2seq4repair_space>detected<seq2seq4repair_space>between:<seq2seq4repair_space>" ) + ( detector . getBubbleBoundaries ( ) . get ( i ) . getStartNode ( ) . getId ( ) ) ) + "<seq2seq4repair_space>and<seq2seq4repair_space>" ) + ( detector . getBubbleBoundaries ( ) . get ( i ) . getEndNode ( ) . getId ( ) ) ) + "<seq2seq4repair_space>,zoomlevel:<seq2seq4repair_space>" ) + ( detector . getBubbleBoundaries ( ) . get ( i ) . getZoomLevel ( ) ) ) ) ; } BubbleCollapser collapser = new BubbleCollapser ( detector . getBubbleBoundaries ( ) ) ; collapser . collapseBubbles ( ) ; } }

Fix:
InputStream is = BubbleMain . class . getClass ( ) . getResourceAsStream ( "//genomes//testGraph.gfa" ) ;
Buggy code:
public class EeHandler extends AbstractHandler implements Constants { @ Override public Object execute ( final ExecutionEvent event ) throws ExecutionException { } protected void oauth ( final ExecutionEvent event ) throws ExecutionException { final Shell shell = HandlerUtil . getActiveShellChecked ( event ) ; int opt = EclipseUtil . openCustomImageTypeWithCustomButtons ( shell , Plugin_OAuth_Title , Plugin_OAuth_TokenNotConfigured , new org . eclipse . swt . graphics . Image ( Display . getDefault ( ) , getClass ( ) . getClassLoader ( ) . getResourceAsStream ( OAUTH_EVERNOTE_TRADEMARK ) ) , ArrayUtils . toArray ( Plugin_OAuth_Configure , Plugin_OAuth_NotNow ) ) ; if ( opt == 0 ) { try { new org . eclipse . jface . dialogs . ProgressMonitorDialog ( shell ) . run ( true , true , new IRunnableWithProgress ( ) { @ Override public void run ( final org . eclipse . core . runtime . IProgressMonitor monitor ) { monitor . beginTask ( Messages . Plugin_OAuth_Waiting , org . eclipse . core . runtime . IProgressMonitor . UNKNOWN ) ; try { <START_BUG> String token = new com . prairie . eemory . oauth . OAuth ( ) . auth ( ) ; <END_BUG> if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( token ) ) { com . prairie . eemory . util . IDialogSettingsUtil . set ( PLUGIN_SETTINGS_KEY_TOKEN , com . prairie . eemory . util . EncryptionUtil . encrypt ( token ) ) ; } } catch ( Throwable e ) { ThrowableHandler . handleDesignTimeErr ( shell , e ) ; } monitor . done ( ) ; } } ) ; } catch ( Throwable e ) { throw ThrowableHandler . handleExecErr ( e ) ; } } } protected void clipFileClicked ( final ExecutionEvent event ) throws ExecutionException { } protected void clipSelectionClicked ( final ExecutionEvent event ) throws ExecutionException { } protected void clipScreenshotClicked ( final ExecutionEvent event ) throws ExecutionException { } protected void configurationsClicked ( final ExecutionEvent event ) throws ExecutionException { } private ENNote createENNote ( ) throws IOException , ClassNotFoundException { } private void saveIfNeeded ( final ENNote args ) throws IOException { } }

Fix:
String token = new com . prairie . eemory . oauth . OAuth ( ) . auth ( shell ) ;
Buggy code:
public class RegexExtractorGui extends AbstractPostProcessorGui { private static final long serialVersionUID = 240L ; private JLabeledTextField regexField ; private JLabeledTextField templateField ; private JLabeledTextField defaultField ; private JLabeledTextField matchNumberField ; private JLabeledTextField refNameField ; private JRadioButton useBody ; private JRadioButton useUnescapedBody ; private JRadioButton useHeaders ; private JRadioButton useURL ; private JRadioButton useCode ; private JRadioButton useMessage ; private ButtonGroup group ; public RegexExtractorGui ( ) { } public String getLabelResource ( ) { } @ Override public void configure ( TestElement el ) { super . configure ( el ) ; if ( el instanceof RegexExtractor ) { RegexExtractor re = ( ( RegexExtractor ) ( el ) ) ; <START_BUG> showScopeSettings ( re ) ; <END_BUG> useHeaders . setSelected ( re . useHeaders ( ) ) ; useBody . setSelected ( re . useBody ( ) ) ; useUnescapedBody . setSelected ( re . useUnescapedBody ( ) ) ; useURL . setSelected ( re . useUrl ( ) ) ; useCode . setSelected ( re . useCode ( ) ) ; useMessage . setSelected ( re . useMessage ( ) ) ; regexField . setText ( re . getRegex ( ) ) ; templateField . setText ( re . getTemplate ( ) ) ; defaultField . setText ( re . getDefaultValue ( ) ) ; matchNumberField . setText ( re . getMatchNumberAsString ( ) ) ; refNameField . setText ( re . getRefName ( ) ) ; } } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement extractor ) { } @ Override public void clearGui ( ) { } private void init ( ) { } private JPanel makeSourcePanel ( ) { } private JPanel makeParameterPanel ( ) { } private void addField ( JPanel panel , JLabeledTextField field , GridBagConstraints gbc ) { } private void resetContraints ( GridBagConstraints gbc ) { } private void initConstraints ( GridBagConstraints gbc ) { } }

Fix:
showScopeSettings ( re , true ) ;
Buggy code:
public class P4Change extends P4Base { protected String emptyChangeList = null ; protected String description = "AutoSubmit<seq2seq4repair_space>By<seq2seq4repair_space>Ant" ; public void execute ( ) throws BuildException { if ( ( emptyChangeList ) == null ) { emptyChangeList = getEmptyChangeList ( ) ; } <START_BUG> final Project myProj = project ; <END_BUG> P4Handler handler = new P4HandlerAdapter ( ) { public void process ( String line ) { if ( util . match ( "//Change//" , line ) ) { line = util . substitute ( "s//[^0-9]////g" , line ) ; int changenumber = Integer . parseInt ( line ) ; log ( ( "Change<seq2seq4repair_space>Number<seq2seq4repair_space>is<seq2seq4repair_space>" + changenumber ) , MSG_INFO ) ; myProj . setProperty ( "p4.change" , ( "" + changenumber ) ) ; } else if ( util . match ( "//error//" , line ) ) { throw new BuildException ( "Perforce<seq2seq4repair_space>Error,<seq2seq4repair_space>check<seq2seq4repair_space>client<seq2seq4repair_space>settings<seq2seq4repair_space>and//or<seq2seq4repair_space>server" ) ; } } } ; handler . setOutput ( emptyChangeList ) ; execP4Command ( "change<seq2seq4repair_space>-i" , handler ) ; } public String getEmptyChangeList ( ) throws BuildException { } public static final String backslash ( String value ) { } public void setDescription ( String desc ) { } }

Fix:
final Project myProj = getProject ( ) ;
Buggy code:
public abstract class WeightedDistanceMeasure implements DistanceMeasure { private List < Parameter < ? > > parameters ; private Parameter < Path > weightsFile ; private Parameter < Class > vectorClass ; protected Vector weights ; @ Override public void createParameters ( String prefix , JobConf jobConf ) { } @ Override public Collection < Parameter < ? > > getParameters ( ) { } @ Override public void configure ( JobConf jobConf ) { if ( ( parameters ) == null ) { ParameteredGeneralizations . configureParameters ( this , jobConf ) ; } try { <START_BUG> FileSystem fs = FileSystem . get ( jobConf ) ; <END_BUG> if ( ( weightsFile . get ( ) ) != null ) { Vector weights = ( ( Vector ) ( vectorClass . get ( ) . newInstance ( ) ) ) ; if ( ! ( fs . exists ( weightsFile . get ( ) ) ) ) { throw new FileNotFoundException ( weightsFile . get ( ) . toString ( ) ) ; } DataInputStream in = fs . open ( weightsFile . get ( ) ) ; try { weights . readFields ( in ) ; } finally { in . close ( ) ; } this . weights = weights ; } } catch ( IOException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } catch ( InstantiationException e ) { throw new RuntimeException ( e ) ; } } public Vector getWeights ( ) { } public void setWeights ( Vector weights ) { } }

Fix:
FileSystem fs = FileSystem . get ( weightsFile . get ( ) . toUri ( ) , jobConf ) ;
Buggy code:
public class MockWebApplication extends WebApplication { private static Log log = LogFactory . getLog ( MockWebApplication . class ) ; private final MockServletContext context ; private Page lastRenderedPage ; private Page previousRenderedPage ; private final MockHttpServletRequest servletRequest ; private final MockHttpServletResponse servletResponse ; private final MockHttpSession servletSession ; private WebRequest wicketRequest ; private Map parametersForNextRequest = new HashMap ( ) ; private WebResponse wicketResponse ; private WebSession wicketSession ; private Class homePage ; public MockWebApplication ( final String path ) { } protected void init ( ) { } public Page getLastRenderedPage ( ) { } public Page getPreviousRenderedPage ( ) { } public ServletContext getServletContext ( ) { } public MockHttpServletRequest getServletRequest ( ) { } public MockHttpServletResponse getServletResponse ( ) { } public MockHttpSession getServletSession ( ) { } public WebRequest getWicketRequest ( ) { } public WebResponse getWicketResponse ( ) { } public WebSession getWicketSession ( ) { } public void processRequestCycle ( final Component component ) { } public void processRequestCycle ( ) { WebRequestCycle cycle = new WebRequestCycle ( wicketSession , wicketRequest , wicketResponse ) ; cycle . request ( ) ; previousRenderedPage = lastRenderedPage ; final MockHttpServletResponse httpResponse = ( ( MockHttpServletResponse ) ( cycle . getWebResponse ( ) . getHttpServletResponse ( ) ) ) ; if ( httpResponse . isRedirect ( ) ) { generateLastRenderedPage ( cycle ) ; final MockHttpServletRequest httpRequest = ( ( MockHttpServletRequest ) ( ( ( WebRequest ) ( cycle . getWebRequest ( ) ) ) . getHttpServletRequest ( ) ) ) ; httpRequest . setRequestToRedirectString ( httpResponse . getRedirectLocation ( ) ) ; wicketSession = getSession ( wicketRequest ) ; new WebRequestCycle ( wicketSession , wicketRequest , wicketResponse ) . request ( ) ; } generateLastRenderedPage ( cycle ) ; Session . set ( getWicketSession ( ) ) ; if ( ( getLastRenderedPage ( ) ) instanceof ExceptionErrorPage ) { <START_BUG> throw new wicket . WicketRuntimeException ( ( ( ExceptionErrorPage ) ( getLastRenderedPage ( ) ) ) . getRootCause ( ) ) ; <END_BUG> } } private void generateLastRenderedPage ( WebRequestCycle cycle ) { } public WebRequestCycle createRequestCycle ( ) { } public void setupRequestAndResponse ( ) { } public Map getParametersForNextRequest ( ) { } public void setParametersForNextRequest ( Map parametersForNextRequest ) { } public Class getHomePage ( ) { } public void setHomePage ( Class clazz ) { } }

Fix:
throw new wicket . WicketRuntimeException ( ( ( ExceptionErrorPage ) ( getLastRenderedPage ( ) ) ) . getThrowable ( ) ) ;
Buggy code:
public class LightColorFactory implements IExecutableExtension , IColorFactory { protected static final RGB white = ColorUtil . getColorValue ( "COLOR_WHITE" ) ; protected static final RGB black = ColorUtil . getColorValue ( "COLOR_BLACK" ) ; String baseColorName ; String definitionId ; public static RGB createHighlightStartColor ( RGB tabStartColor ) { } public void setInitializationData ( IConfigurationElement config , String propertyName , Object data ) { } protected int valuesInRange ( RGB test , int lower , int upper ) { } private RGB getLightenedColor ( RGB sample ) { if ( ( valuesInRange ( sample , 180 , 255 ) ) >= 2 ) return sample ; if ( ( valuesInRange ( sample , 100 , 179 ) ) >= 2 ) <START_BUG> return ColorUtil . blend ( LightColorFactory . white , sample , 30 ) ; <END_BUG> if ( ( valuesInRange ( sample , 0 , 99 ) ) >= 2 ) return ColorUtil . blend ( LightColorFactory . white , sample , 60 ) ; return ColorUtil . blend ( LightColorFactory . white , sample , 30 ) ; } private RGB getActiveFocusStartColor ( ) { } private RGB getActiveFocusEndColor ( ) { } private RGB getActiveFocusTextColor ( ) { } private RGB getActiveNofocusStartColor ( ) { } public RGB createColor ( ) { } }

Fix:
return ColorUtil . blend ( LightColorFactory . white , sample , 40 ) ;
Buggy code:
public final class BlockComment extends Comment { private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } BlockComment ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { BlockComment result = new BlockComment ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class Music { AbsMusic music ; ArrayList < MusicListener > musicListenerList = new ArrayList < MusicListener > ( ) ; public Music ( String path , boolean b ) { } public boolean setPosition ( float f ) { } public void loop ( ) { } public void play ( ) { } public boolean playing ( ) { } public void pause ( ) { } public void resume ( ) { } public void setVolume ( float volume ) { } public void stop ( ) { } public void fade ( int duration , float f , boolean b ) { } float lastPosition = 0 ; float lastUpdatePosition = 0 ; long lastTime = TimeUtils . millis ( ) ; long lastUpdateTime = TimeUtils . millis ( ) ; float deltaTime = 0 ; float avgDiff ; public float getPosition ( ) { } public void dispose ( ) { <START_BUG> System . out . println ( ( "Music<seq2seq4repair_space>pause<seq2seq4repair_space>" + ( music . getName ( ) ) ) ) ; <END_BUG> music . dispose ( ) ; } public void setMusicVolume ( float musvolume ) { } public void addListener ( MusicListener musicListener ) { } }

Fix:
System . out . println ( ( "Music<seq2seq4repair_space>dispose<seq2seq4repair_space>" + ( music . getName ( ) ) ) ) ;
Buggy code:
public class HttpRequestHdr { Logger log = LoggingManager . getLoggerFor ( HTTP ) ; public String method = new String ( ) ; public String url = new String ( ) ; public String version = new String ( ) ; public String postData = "" ; static String CR = "\r\n" ; private Map headers = new HashMap ( ) ; public byte [ ] parse ( InputStream in ) throws IOException { } public void parseFirstLine ( String firstLine ) { } public int parseLine ( String nextLine ) { } public HeaderManager getHeaderManager ( ) { HeaderManager manager = new HeaderManager ( ) ; Iterator keys = headers . keySet ( ) . iterator ( ) ; while ( keys . hasNext ( ) ) { String key = ( ( String ) ( keys . next ( ) ) ) ; <START_BUG> if ( ( ! ( key . equals ( "proxy-connection" ) ) ) && ( ! ( key . equals ( "content-length" ) ) ) ) { <END_BUG> manager . add ( ( ( Header ) ( headers . get ( key ) ) ) ) ; } } manager . setName ( "Browser-derived<seq2seq4repair_space>headers" ) ; manager . setProperty ( TEST_CLASS , HeaderManager . class . getName ( ) ) ; manager . setProperty ( GUI_CLASS , HeaderPanel . class . getName ( ) ) ; return manager ; } public HTTPSampler getSampler ( ) throws IOException , MalformedURLException , ProtocolException { } public String getContentType ( ) { } public static MultipartUrlConfig isMultipart ( String contentType ) { } private HTTPSampler createSampler ( ) { } public String serverName ( ) { } public int serverPort ( ) { } public String serverUrl ( ) { } String getToken ( StringTokenizer tk ) { } String getRemainder ( StringTokenizer tk ) { } public static class Test extends TestCase { public Test ( String name ) { } public void setUp ( ) { } public void testRepeatedArguments ( ) throws Exception { } } }

Fix:
if ( ( ( ! ( key . equals ( "proxy-connection" ) ) ) && ( ! ( key . equals ( "content-length" ) ) ) ) && ( ! ( key . equals ( "accept-encoding" ) ) ) ) {
Buggy code:
public class WebMvcConfigurationSupportExtensionTests { private WebMvcConfigurationSupportExtensionTests . TestWebMvcConfigurationSupport webConfig ; private StaticWebApplicationContext webAppContext ; @ Before public void setUp ( ) { } @ Test public void handlerMappings ( ) throws Exception { } @ Test public void requestMappingHandlerAdapter ( ) throws Exception { } @ Test public void webBindingInitializer ( ) throws Exception { } @ Test public void contentNegotiation ( ) throws Exception { } @ Test public void exceptionResolvers ( ) throws Exception { } @ Controller private static class TestController { @ RequestMapping ( "//" ) public void handle ( ) { } } private class TestWebMvcConfigurationSupport extends WebMvcConfigurationSupport implements WebMvcConfigurer { @ Override public void addFormatters ( FormatterRegistry registry ) { } @ Override public void configureMessageConverters ( List < HttpMessageConverter < ? > > converters ) { } @ Override public Validator getValidator ( ) { } @ Override public void configureContentNegotiation ( ContentNegotiationConfigurer configurer ) { <START_BUG> configurer . setFavorParameter ( true ) . setParameterName ( "f" ) ; <END_BUG> } @ Override public void configureAsyncSupport ( AsyncSupportConfigurer configurer ) { } @ Override public void addArgumentResolvers ( List < HandlerMethodArgumentResolver > argumentResolvers ) { } @ Override public void addReturnValueHandlers ( List < HandlerMethodReturnValueHandler > returnValueHandlers ) { } @ Override public void configureHandlerExceptionResolvers ( List < HandlerExceptionResolver > exceptionResolvers ) { } @ Override public void addInterceptors ( InterceptorRegistry registry ) { } @ SuppressWarnings ( "serial" ) @ Override public MessageCodesResolver getMessageCodesResolver ( ) { } @ Override public void addViewControllers ( ViewControllerRegistry registry ) { } @ Override public void addResourceHandlers ( ResourceHandlerRegistry registry ) { } @ Override public void configureDefaultServletHandling ( DefaultServletHandlerConfigurer configurer ) { } } }

Fix:
configurer . favorParameter ( true ) . parameterName ( "f" ) ;