nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BasicEventDispatcher implements EventDispatcher { private final Map < Class < ? extends Event > , List < EventListener < ? > > > registeredListeners = new Hashtable < > ( ) ; private InetSocketAddress remoteAddress ; @ Override public < T extends Event > void register ( final Class < T > eventType , final EventListener < T > eventListener ) { } @ Override public int countRegistered ( final Class < ? extends Event > eventType ) { } @ Override public void dispatch ( final Event [ ] events ) { } @ Override public void dispatch ( final Event event ) { } @ Override public InetSocketAddress getRemoteAddress ( ) { } @ Override <START_BUG> public void setRemoteAddress ( InetSocketAddress address ) { <END_BUG> this . remoteAddress = address ; } }

Fix:
public void setRemoteAddress ( final InetSocketAddress address ) {
Buggy code:
public class PebbleViewTests { private MockHttpServletRequest request = new MockHttpServletRequest ( ) ; private MockHttpServletResponse response = new MockHttpServletResponse ( ) ; private AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext ( ) ; @ Before public void init ( ) { } @ Test public void test ( ) throws Exception { <START_BUG> PebbleView view = new PebbleView ( new PebbleEngine . Builder ( ) . loader ( new StringLoader ( ) ) . build ( ) . getTemplate ( "Hello<seq2seq4repair_space>{{msg}}" ) ) ; <END_BUG> view . setApplicationContext ( context ) ; view . render ( Collections . singletonMap ( "msg" , "World" ) , request , response ) ; assertEquals ( "Hello<seq2seq4repair_space>World" , response . getContentAsString ( ) ) ; } }

Fix:
PebbleView view = new PebbleView ( new PebbleEngine . Builder ( ) . loader ( new StringLoader ( ) ) . build ( ) , "Hello<seq2seq4repair_space>{{msg}}" ) ;
Buggy code:
public class Test implements TestMBean { static final Logger log = Logger . getLogger ( Test . class ) ; private QueueConnection conn ; private Queue queue ; private QueueSession session ; private final List < String > receivedMessages = new ArrayList < String > ( ) ; public void start ( ) throws Exception { InitialContext ctx = new InitialContext ( ) ; <START_BUG> QueueConnectionFactory qcf = ( ( QueueConnectionFactory ) ( ctx . lookup ( "ConnectionFactory" ) ) ) ; <END_BUG> conn = qcf . createQueueConnection ( ) ; conn . start ( ) ; queue = ( ( Queue ) ( ctx . lookup ( "queue//test" ) ) ) ; session = conn . createQueueSession ( false , AUTO_ACKNOWLEDGE ) ; QueueReceiver recv = session . createReceiver ( queue ) ; recv . setMessageListener ( new Test . ExampeMessageListener ( ) ) ; } public void stop ( ) throws Exception { } public void sendMessage ( String txt ) throws Exception { } public List < String > readMessages ( ) { } private class ExampeMessageListener implements MessageListener { @ Override public void onMessage ( Message message ) { } } }

Fix:
QueueConnectionFactory qcf = ( ( QueueConnectionFactory ) ( ctx . lookup ( "java://ConnectionFactory" ) ) ) ;
Buggy code:
public class SecurityDomainModelv12UnitTestCase extends AbstractSubsystemBaseTest { public SecurityDomainModelv12UnitTestCase ( ) { } @ Test public void testParseAndMarshalModel ( ) throws Exception { String subsystemXml = readResource ( "securitysubsystemv12.xml" ) ; KernelServices servicesA = super . installInController ( MANAGEMENT , subsystemXml ) ; ModelNode modelA = servicesA . readWholeModel ( ) ; String marshalled = servicesA . getPersistedSubsystemXml ( ) ; servicesA . shutdown ( ) ; System . out . println ( marshalled ) ; KernelServices servicesB = super . installInController ( MANAGEMENT , marshalled ) ; ModelNode modelB = servicesB . readWholeModel ( ) ; super . compare ( modelA , modelB ) ; <START_BUG> assertRemoveSubsystemResources ( servicesA ) ; <END_BUG> } @ Override protected String getSubsystemXml ( ) throws IOException { } }

Fix:
assertRemoveSubsystemResources ( servicesB ) ;
Buggy code:
public class CompoundStatement extends Statement { private ArrayList < VarDeclaration > localDecl ; private ArrayList < Statement > stmtList ; public CompoundStatement ( ArrayList < VarDeclaration > l , ArrayList < Statement > s ) { } public void printStatement ( String offset , BufferedWriter writer ) throws IOException { writer . write ( ( offset + "CompoundStatement" ) ) ; writer . newLine ( ) ; for ( VarDeclaration vardecl : getLocalDecl ( ) ) { <START_BUG> vardecl . printVarDeclaration ( ( offset + "<seq2seq4repair_space>" ) , writer ) ; <END_BUG> } for ( Statement stmt : getStmtList ( ) ) { stmt . printStatement ( ( offset + "<seq2seq4repair_space>" ) , writer ) ; } } public ArrayList < VarDeclaration > getLocalDecl ( ) { } public void setLocalDecl ( ArrayList < VarDeclaration > localDecl ) { } public ArrayList < Statement > getStmtList ( ) { } public void setStmtList ( ArrayList < Statement > stmtList ) { } }

Fix:
vardecl . printDeclaration ( ( offset + "<seq2seq4repair_space>" ) , writer ) ;
Buggy code:
public abstract class AbstractDetachableModel implements IModel { private transient boolean attached = false ; public final void attach ( ) { } public final void detach ( ) { } public final Object getObject ( ) { } public void setObject ( Object object ) { <START_BUG> throw new UnsupportedOperationException ( ( ( "DetachableModel<seq2seq4repair_space>" + ( getClass ( ) ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>support<seq2seq4repair_space>setObject(Object)" ) ) ; <END_BUG> } public boolean isAttached ( ) { } protected abstract void onAttach ( ) { } protected abstract void onDetach ( ) { } protected abstract Object onGetObject ( ) { } }

Fix:
throw new UnsupportedOperationException ( ( ( "AbstractDetachableModel<seq2seq4repair_space>" + ( getClass ( ) ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>support<seq2seq4repair_space>setObject(Object)" ) ) ;
Buggy code:
public class RegionBasedHierarchyBuilder extends HierarchyBuilder { public RegionBasedHierarchyBuilder ( TypeHierarchy hierarchy ) throws JavaModelException { } public void build ( boolean computeSubtypes ) { <START_BUG> if ( ( ( this . hierarchy . fType ) == null ) || computeSubtypes ) { <END_BUG> ArrayList allTypesInRegion = determineTypesInRegion ( ) ; this . hierarchy . initialize ( allTypesInRegion . size ( ) ) ; createTypeHierarchyBasedOnRegion ( allTypesInRegion ) ; } else { this . hierarchy . initialize ( 1 ) ; this . buildSupertypes ( ) ; } } private void createTypeHierarchyBasedOnRegion ( ArrayList allTypesInRegion ) { } private ArrayList determineTypesInRegion ( ) { } private void injectAllTypesForJavaProject ( IJavaProject project , ArrayList types ) { } private void injectAllTypesForPackageFragment ( IPackageFragment packFrag , ArrayList types ) { } private void injectAllTypesForPackageFragmentRoot ( IPackageFragmentRoot root , ArrayList types ) { } private void injectAllTypesForTypeContainers ( IClassFile [ ] containers , ArrayList types ) { } private void injectAllTypesForTypeContainers ( ICompilationUnit [ ] containers , ArrayList types ) { } }

Fix:
if ( ( ( this . hierarchy . type ) == null ) || computeSubtypes ) {
Buggy code:
public final class ContactFacade { public static void addContact ( int uid , String address ) { if ( address == null ) { return ; } if ( ( address . length ( ) ) == 0 ) return ; Address adr ; try { adr = Address . parse ( address ) ; } catch ( ParserException e1 ) { if ( MainInterface . DEBUG ) e1 . printStackTrace ( ) ; return ; } System . out . println ( ( "address:" + address ) ) ; AbstractFolder selectedFolder = ( ( AbstractFolder ) ( addressbookTreeModel . getFolder ( uid ) ) ) ; try { <START_BUG> if ( ( selectedFolder . exists ( adr . getMailAddress ( ) ) ) != null ) { <END_BUG> Contact card = new Contact ( ) ; String fn = adr . getShortAddress ( ) ; card . set ( FN , fn ) ; card . set ( DISPLAYNAME , fn ) ; card . set ( EMAIL , EMAIL_TYPE_INTERNET , adr . getMailAddress ( ) ) ; selectedFolder . add ( card ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } public static void addContactToCollectedAddresses ( String address ) { } }

Fix:
if ( ( selectedFolder . exists ( adr . getMailAddress ( ) ) ) == null ) {
Buggy code:
public class DoubleValue extends Value { private double value ; public DoubleValue ( String prop ) { } public Class < Double > getValueType ( ) { } public void set ( double value ) { } <START_BUG> public double get ( ) { <END_BUG> return value ; } protected String getInternalString ( ) { } protected void setInternalString ( String val ) { } protected void setInternalObject ( Object obj ) { } }

Fix:
public Double get ( ) {
Buggy code:
public class MimeMappingAdd implements OperationStepHandler { static final MimeMappingAdd INSTANCE = new MimeMappingAdd ( ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode mimetypes = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) . get ( Constants . MIME_MAPPING ) ; if ( ( operation . hasDefined ( "name" ) ) && ( operation . hasDefined ( "value" ) ) ) { mimetypes . get ( operation . get ( "name" ) . asString ( ) ) . set ( operation . get ( "value" ) . asString ( ) ) ; } else { <START_BUG> throw new OperationFailedException ( new ModelNode ( ) . set ( WebMessages . MESSAGES . nameAndValueRequiredForAddMimeMapping ( ) ) ) ; <END_BUG> } context . stepCompleted ( ) ; } }

Fix:
throw new OperationFailedException ( WebMessages . MESSAGES . nameAndValueRequiredForAddMimeMapping ( ) ) ;
Buggy code:
public class ItemPoweredBase extends ItemBase implements IEnergyContainerItem { protected int capacity ; protected int maxReceive ; protected int maxExtract ; public ItemPoweredBase ( String name ) { } public ItemPoweredBase ( String name , int capacity ) { } public ItemPoweredBase ( String name , int capacity , int maxTransfer ) { } public ItemPoweredBase ( String name , int capacity , int maxReceive , int maxExtract ) { } public int getMaxReceive ( ) { } public int getMaxExtract ( ) { } @ Override public boolean showDurabilityBar ( ItemStack stack ) { } @ Override public double getDurabilityForDisplay ( ItemStack stack ) { } @ Override @ SideOnly ( Side . CLIENT ) public void addInformation ( ItemStack stack , EntityPlayer player , List list , boolean advancedTooltips ) { int energy = getEnergyStored ( stack ) ; int maxEnergy = getMaxEnergyStored ( stack ) ; <START_BUG> int percent = ( energy * 100 ) // maxEnergy ; <END_BUG> String color = "" ; if ( percent > 75 ) { color += EnumChatFormatting . DARK_GREEN ; } else if ( percent > 60 ) { color += EnumChatFormatting . GREEN ; } else if ( percent > 45 ) { color += EnumChatFormatting . YELLOW ; } else if ( percent > 30 ) { color += EnumChatFormatting . GOLD ; } else if ( percent > 15 ) { color += EnumChatFormatting . RED ; } else { color += EnumChatFormatting . DARK_RED ; } list . add ( ( ( color . equals ( "" ) ? "" : color ) + ( Utils . localizeFormatted ( "rf.info" , energy , maxEnergy ) ) ) ) ; } @ Override @ SideOnly ( Side . CLIENT ) public void getSubItems ( Item item , CreativeTabs tabs , List list ) { } @ Override public int receiveEnergy ( ItemStack container , int maxReceive , boolean simulate ) { } @ Override public int extractEnergy ( ItemStack container , int maxExtract , boolean simulate ) { } @ Override public int getEnergyStored ( ItemStack container ) { } @ Override public int getMaxEnergyStored ( ItemStack container ) { } }

Fix:
int percent = ( maxEnergy != 0 ) ? ( energy * 100 ) // maxEnergy : 0 ;
Buggy code:
public class TestPayloadSpans extends LuceneTestCase { private IndexSearcher searcher ; private Similarity similarity = new DefaultSimilarity ( ) ; protected IndexReader indexReader ; private IndexReader closeIndexReader ; private Directory directory ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; PayloadHelper helper = new PayloadHelper ( ) ; <START_BUG> searcher = helper . setUp ( similarity , 1000 ) ; <END_BUG> indexReader = searcher . getIndexReader ( ) ; } public void testSpanTermQuery ( ) throws Exception { } public void testSpanFirst ( ) throws IOException { } public void testSpanNot ( ) throws Exception { } public void testNestedSpans ( ) throws Exception { } public void testFirstClauseWithoutPayload ( ) throws Exception { } public void testHeavilyNestedSpanQuery ( ) throws Exception { } public void testShrinkToAfterShortestMatch ( ) throws IOException , CorruptIndexException , LockObtainFailedException { } public void testShrinkToAfterShortestMatch2 ( ) throws IOException , CorruptIndexException , LockObtainFailedException { } public void testShrinkToAfterShortestMatch3 ( ) throws IOException , CorruptIndexException , LockObtainFailedException { } public void testPayloadSpanUtil ( ) throws Exception { } private void checkSpans ( Spans spans , int expectedNumSpans , int expectedNumPayloads , int expectedPayloadLength , int expectedFirstByte ) throws IOException { } private IndexSearcher getSearcher ( ) throws Exception { } private void checkSpans ( Spans spans , int numSpans , int [ ] numPayloads ) throws IOException { } final class PayloadAnalyzer extends Analyzer { @ Override public TokenStream tokenStream ( String fieldName , Reader reader ) { } } final class PayloadFilter extends TokenFilter { String fieldName ; int numSeen = 0 ; Set < String > entities = new HashSet < String > ( ) ; Set < String > nopayload = new HashSet < String > ( ) ; int pos ; PayloadAttribute payloadAtt ; CharTermAttribute termAtt ; PositionIncrementAttribute posIncrAtt ; public PayloadFilter ( TokenStream input , String fieldName ) { } @ Override public boolean incrementToken ( ) throws IOException { } } public final class TestPayloadAnalyzer extends Analyzer { @ Override public TokenStream tokenStream ( String fieldName , Reader reader ) { } } }

Fix:
searcher = helper . setUp ( random , similarity , 1000 ) ;
Buggy code:
public class Caverphone implements StringEncoder { public Caverphone ( ) { } public String caverphone ( String txt ) { if ( ( txt == null ) || ( ( txt . length ( ) ) == 0 ) ) { return "1111111111" ; } <START_BUG> txt = txt . toLowerCase ( ) ; <END_BUG> txt = txt . replaceAll ( "[^a-z]" , "" ) ; txt = txt . replaceAll ( "e$" , "" ) ; txt = txt . replaceAll ( "^cough" , "cou2f" ) ; txt = txt . replaceAll ( "^rough" , "rou2f" ) ; txt = txt . replaceAll ( "^tough" , "tou2f" ) ; txt = txt . replaceAll ( "^enough" , "enou2f" ) ; txt = txt . replaceAll ( "^trough" , "trou2f" ) ; txt = txt . replaceAll ( "^gn" , "2n" ) ; txt = txt . replaceAll ( "^mb" , "m2" ) ; txt = txt . replaceAll ( "cq" , "2q" ) ; txt = txt . replaceAll ( "ci" , "si" ) ; txt = txt . replaceAll ( "ce" , "se" ) ; txt = txt . replaceAll ( "cy" , "sy" ) ; txt = txt . replaceAll ( "tch" , "2ch" ) ; txt = txt . replaceAll ( "c" , "k" ) ; txt = txt . replaceAll ( "q" , "k" ) ; txt = txt . replaceAll ( "x" , "k" ) ; txt = txt . replaceAll ( "v" , "f" ) ; txt = txt . replaceAll ( "dg" , "2g" ) ; txt = txt . replaceAll ( "tio" , "sio" ) ; txt = txt . replaceAll ( "tia" , "sia" ) ; txt = txt . replaceAll ( "d" , "t" ) ; txt = txt . replaceAll ( "ph" , "fh" ) ; txt = txt . replaceAll ( "b" , "p" ) ; txt = txt . replaceAll ( "sh" , "s2" ) ; txt = txt . replaceAll ( "z" , "s" ) ; txt = txt . replaceAll ( "^[aeiou]" , "A" ) ; txt = txt . replaceAll ( "[aeiou]" , "3" ) ; txt = txt . replaceAll ( "j" , "y" ) ; txt = txt . replaceAll ( "^y3" , "Y3" ) ; txt = txt . replaceAll ( "^y" , "A" ) ; txt = txt . replaceAll ( "y" , "3" ) ; txt = txt . replaceAll ( "3gh3" , "3kh3" ) ; txt = txt . replaceAll ( "gh" , "22" ) ; txt = txt . replaceAll ( "g" , "k" ) ; txt = txt . replaceAll ( "s+" , "S" ) ; txt = txt . replaceAll ( "t+" , "T" ) ; txt = txt . replaceAll ( "p+" , "P" ) ; txt = txt . replaceAll ( "k+" , "K" ) ; txt = txt . replaceAll ( "f+" , "F" ) ; txt = txt . replaceAll ( "m+" , "M" ) ; txt = txt . replaceAll ( "n+" , "N" ) ; txt = txt . replaceAll ( "w3" , "W3" ) ; txt = txt . replaceAll ( "wh3" , "Wh3" ) ; txt = txt . replaceAll ( "w$" , "3" ) ; txt = txt . replaceAll ( "w" , "2" ) ; txt = txt . replaceAll ( "^h" , "A" ) ; txt = txt . replaceAll ( "h" , "2" ) ; txt = txt . replaceAll ( "r3" , "R3" ) ; txt = txt . replaceAll ( "r$" , "3" ) ; txt = txt . replaceAll ( "r" , "2" ) ; txt = txt . replaceAll ( "l3" , "L3" ) ; txt = txt . replaceAll ( "l$" , "3" ) ; txt = txt . replaceAll ( "l" , "2" ) ; txt = txt . replaceAll ( "2" , "" ) ; txt = txt . replaceAll ( "3$" , "A" ) ; txt = txt . replaceAll ( "3" , "" ) ; txt = ( txt + "111111" ) + "1111" ; return txt . substring ( 0 , 10 ) ; } public Object encode ( Object pObject ) throws EncoderException { } public String encode ( String pString ) { } public boolean isCaverphoneEqual ( String str1 , String str2 ) { } }

Fix:
txt = txt . toLowerCase ( Locale . ENGLISH ) ;
Buggy code:
public class DegreeSite extends DegreeSite_Base { public DegreeSite ( Degree degree ) { } @ Override public LocalizedString getName ( ) { <START_BUG> if ( ( super . getName ( ) ) != null ) { <END_BUG> if ( ( getDegree ( ) . getPhdProgram ( ) ) != null ) { return new LocalizedString ( ) . with ( Locale . getDefault ( ) , getDegree ( ) . getPhdProgram ( ) . getPresentationName ( ) ) ; } else { return new LocalizedString ( ) . with ( Locale . getDefault ( ) , getDegree ( ) . getPresentationName ( ) ) ; } } else { return super . getName ( ) ; } } @ Override public LocalizedString getDescription ( ) { } @ Override public DomainObject getObject ( ) { } @ Override public void delete ( ) { } public Stream < Wrap > getCategoriesToShow ( ) { } }

Fix:
if ( ( super . getName ( ) ) == null ) {
Buggy code:
final class InputStreamContainer extends FileContainer { private StorageFile containerPath ; InputStreamContainer ( BaseDataFileFactory factory ) { } final boolean openContainer ( ContainerKey newIdentity ) throws StandardException { DataInputStream dis = null ; try { InputStream is = null ; containerPath = dataFactory . getContainerPath ( newIdentity , false ) ; try { is = containerPath . getInputStream ( ) ; } catch ( IOException ioe ) { containerPath = dataFactory . getContainerPath ( newIdentity , true ) ; try { is = getInputStream ( ) ; } catch ( IOException ioe2 ) { containerPath = null ; return false ; } } dis = new DataInputStream ( is ) ; <START_BUG> readHeader ( dis ) ; <END_BUG> return true ; } catch ( IOException ioe ) { throw StandardException . newException ( FILE_CONTAINER_EXCEPTION , ioe , this ) ; } finally { if ( dis != null ) { try { dis . close ( ) ; } catch ( IOException ioe ) { } } } } void closeContainer ( ) { } public final void clean ( boolean forRemove ) throws StandardException { } protected final int preAllocate ( long lastPreallocPagenum , int preAllocSize ) { } protected void truncatePages ( long lastValidPagenum ) { } void createContainer ( ContainerKey newIdentity ) throws StandardException { } protected final void removeContainer ( LogInstant instant , boolean leaveStub ) throws StandardException { } protected final void readPage ( long pageNumber , byte [ ] pageData ) throws IOException , StandardException { } protected void readPositionedPage ( long pageOffset , byte [ ] pageData ) throws IOException { } protected final void writePage ( long pageNumber , byte [ ] pageData , boolean syncPage ) throws IOException , StandardException { } protected final void flushAll ( ) { } protected InputStream getInputStream ( ) throws IOException { } protected void backupContainer ( BaseContainerHandle handle , String backupLocation ) throws StandardException { } protected void encryptContainer ( BaseContainerHandle handle , String newFilePath ) throws StandardException { } }

Fix:
readHeader ( getEmbryonicPage ( dis ) ) ;
Buggy code:
public class CompletionOnMethodReturnType extends MethodDeclaration { public CompletionOnMethodReturnType ( TypeReference returnType , CompilationResult compilationResult ) { } public void resolveStatements ( ) { } public StringBuffer print ( int tab , StringBuffer output ) { <START_BUG> return returnType . print ( tab , output ) ; <END_BUG> } }

Fix:
return this . returnType . print ( tab , output ) ;
Buggy code:
public abstract class BaseSampleTestTopK extends BaseTestTopK { protected static final int K = 2 ; protected static final int RETRIES = 10 ; @ Override protected FacetSearchParams searchParamsWithRequests ( int numResults , int partitionSize ) { } protected abstract FacetsAccumulator getSamplingAccumulator ( Sampler sampler , TaxonomyReader taxoReader , IndexReader indexReader , FacetSearchParams searchParams ) { } public void testCountUsingSampling ( ) throws Exception { } private void assertSampling ( List < FacetResult > expected , Query q , Sampler sampler , FacetSearchParams params , boolean complement ) throws Exception { } private FacetsCollector samplingCollector ( final boolean complement , final Sampler sampler , FacetSearchParams samplingSearchParams ) { } private Sampler createSampler ( int nTrial , ScoredDocIDs scoredDocIDs , boolean useRandomSampler ) { SamplingParams samplingParams = new SamplingParams ( ) ; final double retryFactor = Math . pow ( 1.01 , nTrial ) ; samplingParams . setSampleRatio ( ( 0.8 * retryFactor ) ) ; samplingParams . setMinSampleSize ( ( ( int ) ( 100 * retryFactor ) ) ) ; samplingParams . setMaxSampleSize ( ( ( int ) ( 10000 * retryFactor ) ) ) ; samplingParams . setOversampleFactor ( ( 5.0 * retryFactor ) ) ; <START_BUG> samplingParams . setSampingThreshold ( 11000 ) ; <END_BUG> Sampler sampler = ( useRandomSampler ) ? new RandomSampler ( samplingParams , new Random ( random ( ) . nextLong ( ) ) ) : new RepeatableSampler ( samplingParams ) ; assertTrue ( "must<seq2seq4repair_space>enable<seq2seq4repair_space>sampling<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>test!" , sampler . shouldSample ( scoredDocIDs ) ) ; return sampler ; } }

Fix:
samplingParams . setSamplingThreshold ( 11000 ) ;
Buggy code:
public class SpringWebApplicationFactory implements IWebApplicationFactory { private ConfigurableWebApplicationContext additionalContext ; protected final String getContextConfigLocation ( WicketFilter filter ) { } protected ConfigurableWebApplicationContext newApplicationContext ( ) { } public WebApplication createApplication ( WicketFilter filter ) { ServletContext sc = filter . getFilterConfig ( ) . getServletContext ( ) ; WebApplicationContext ac = WebApplicationContextUtils . getWebApplicationContext ( sc ) ; if ( ( getContextConfigLocation ( filter ) ) != null ) { additionalContext = createWebApplicationContext ( ac , filter ) ; } String beanName = filter . getFilterConfig ( ) . getInitParameter ( "applicationBean" ) ; <START_BUG> return createApplication ( additionalContext , beanName ) ; <END_BUG> } private WebApplication createApplication ( ApplicationContext ac , String beanName ) { } protected final ConfigurableWebApplicationContext createWebApplicationContext ( WebApplicationContext parent , WicketFilter filter ) throws BeansException { } protected void postProcessWebApplicationContext ( ConfigurableWebApplicationContext wac , WicketFilter filter ) { } public void destroy ( ) { } }

Fix:
return createApplication ( ( ( additionalContext ) != null ? additionalContext : ac ) , beanName ) ;
Buggy code:
public class NewModelControllerClientOperationHandler extends NewAbstractModelControllerOperationHandler { public NewModelControllerClientOperationHandler ( final ExecutorService executorService , final NewModelController controller ) { } @ Override public ManagementRequestHandler getRequestHandler ( final byte id ) { } private class ExecuteRequestHandler extends ManagementRequestHandler { private ModelNode operation = new ModelNode ( ) ; private int batchId ; private int attachmentsLength ; @ Override protected void readRequest ( final DataInput input ) throws IOException { } @ Override protected void writeResponse ( final FlushableDataOutput output ) throws IOException { ModelNode result ; try { <START_BUG> System . out . println ( ( "---<seq2seq4repair_space>Executing<seq2seq4repair_space>client<seq2seq4repair_space>request<seq2seq4repair_space>" + ( batchId ) ) ) ; <END_BUG> result = controller . execute ( operation , new OperationMessageHandlerProxy ( getContext ( ) , batchId ) , COMMIT , new OperationAttachmentsProxy ( getContext ( ) , batchId , attachmentsLength ) ) ; } catch ( Exception e ) { final ModelNode failure = new ModelNode ( ) ; failure . get ( OUTCOME ) . set ( FAILED ) ; failure . get ( FAILURE_DESCRIPTION ) . set ( ( ( ( e . getClass ( ) . getName ( ) ) + ":" ) + ( e . getMessage ( ) ) ) ) ; result = failure ; } System . out . println ( ( ( ( "---<seq2seq4repair_space>Executed<seq2seq4repair_space>client<seq2seq4repair_space>request<seq2seq4repair_space>" + ( batchId ) ) + "<seq2seq4repair_space>" ) + ( result . get ( OUTCOME ) . asString ( ) ) ) ) ; output . write ( PARAM_RESPONSE ) ; result . writeExternal ( output ) ; } } }

Fix:
System . out . println ( ( ( ( "---<seq2seq4repair_space>Executing<seq2seq4repair_space>client<seq2seq4repair_space>request<seq2seq4repair_space>" + ( batchId ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>" ) + ( getContext ( ) . getChannel ( ) . getName ( ) ) ) ) ;
Buggy code:
public class TransactionController extends GenericController implements Serializable , Controller { protected static final Logger log = LoggingManager . getLoggerForClass ( ) ; private transient String threadName ; private transient ListenerNotifier lnf ; private transient JMeterContext threadContext ; private transient JMeterVariables threadVars ; private transient SampleResult res ; public TransactionController ( ) { } private void log_debug ( String s ) { } private int calls ; public Sampler next ( ) { Sampler returnValue = null ; if ( isFirst ( ) ) { log_debug ( "+++++++++++++++++++++++++++++" ) ; calls = 0 ; res = new SampleResult ( ) ; res . sampleStart ( ) ; } ( calls ) ++ ; returnValue = super . next ( ) ; if ( returnValue == null ) { log_debug ( ( "-----------------------------" + ( calls ) ) ) ; if ( ( res ) == null ) { log_debug ( "already<seq2seq4repair_space>called" ) ; } else { res . sampleEnd ( ) ; res . setSuccessful ( true ) ; res . setSampleLabel ( getName ( ) ) ; <START_BUG> res . setResponseCode ( "200" ) ; <END_BUG> res . setResponseMessage ( ( "Called:<seq2seq4repair_space>" + ( calls ) ) ) ; res . setThreadName ( threadName ) ; threadContext = getThreadContext ( ) ; threadVars = threadContext . getVariables ( ) ; SamplePackage pack = ( ( SamplePackage ) ( threadVars . getObject ( PACKAGE_OBJECT ) ) ) ; if ( pack == null ) { TransactionController . log . warn ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>fetch<seq2seq4repair_space>SamplePackage" ) ; } else { lnf . notifyListeners ( new org . apache . jmeter . samplers . SampleEvent ( res , getName ( ) ) , pack . getSampleListeners ( ) ) ; } res = null ; } } return returnValue ; } }

Fix:
res . setResponseCodeOK ( ) ;
Buggy code:
public final class TestRuleIgnoreTestSuites implements TestRule { public static interface NestedTestSuite { } public static final String PROPERTY_RUN_NESTED = "tests.runnested" ; @ Override public Statement apply ( final Statement s , final Description d ) { return new Statement ( ) { @ Override public void evaluate ( ) throws Throwable { if ( TestRuleIgnoreTestSuites . NestedTestSuite . class . isAssignableFrom ( d . getTestClass ( ) ) ) { <START_BUG> LuceneTestCase . assumeTrue ( "Nested<seq2seq4repair_space>suite<seq2seq4repair_space>class<seq2seq4repair_space>ignored<seq2seq4repair_space>(started<seq2seq4repair_space>as<seq2seq4repair_space>stand-along)." , TestRuleIgnoreTestSuites . isRunningNested ( ) ) ; <END_BUG> } s . evaluate ( ) ; } } ; } public static boolean isRunningNested ( ) { } }

Fix:
LuceneTestCase . assumeTrue ( "Nested<seq2seq4repair_space>suite<seq2seq4repair_space>class<seq2seq4repair_space>ignored<seq2seq4repair_space>(started<seq2seq4repair_space>as<seq2seq4repair_space>stand-alone)." , TestRuleIgnoreTestSuites . isRunningNested ( ) ) ;
Buggy code:
public class TopGroupsFieldCommand implements Command < TopGroups < BytesRef > > { public static class Builder { private SchemaField field ; private Sort groupSort ; private Sort sortWithinGroup ; private Collection < SearchGroup < BytesRef > > firstPhaseGroups ; private Integer maxDocPerGroup ; private boolean needScores = false ; private boolean needMaxScore = false ; public TopGroupsFieldCommand . Builder setField ( SchemaField field ) { } public TopGroupsFieldCommand . Builder setGroupSort ( Sort groupSort ) { } public TopGroupsFieldCommand . Builder setSortWithinGroup ( Sort sortWithinGroup ) { } public TopGroupsFieldCommand . Builder setFirstPhaseGroups ( Collection < SearchGroup < BytesRef > > firstPhaseGroups ) { } public TopGroupsFieldCommand . Builder setMaxDocPerGroup ( int maxDocPerGroup ) { } public TopGroupsFieldCommand . Builder setNeedScores ( Boolean needScores ) { } public TopGroupsFieldCommand . Builder setNeedMaxScore ( Boolean needMaxScore ) { } public TopGroupsFieldCommand build ( ) { } } private final SchemaField field ; private final Sort groupSort ; private final Sort sortWithinGroup ; private final Collection < SearchGroup < BytesRef > > firstPhaseGroups ; private final int maxDocPerGroup ; private final boolean needScores ; private final boolean needMaxScore ; private TermSecondPassGroupingCollector secondPassCollector ; private TopGroupsFieldCommand ( SchemaField field , Sort groupSort , Sort sortWithinGroup , Collection < SearchGroup < BytesRef > > firstPhaseGroups , int maxDocPerGroup , boolean needScores , boolean needMaxScore ) { } public List < Collector > create ( ) throws IOException { } @ SuppressWarnings ( "unchecked" ) public TopGroups < BytesRef > result ( ) { if ( firstPhaseGroups . isEmpty ( ) ) { <START_BUG> return new TopGroups < BytesRef > ( groupSort . getSort ( ) , sortWithinGroup . getSort ( ) , 0 , 0 , new GroupDocs [ 0 ] ) ; <END_BUG> } return secondPassCollector . getTopGroups ( 0 ) ; } public String getKey ( ) { } public Sort getGroupSort ( ) { } public Sort getSortWithinGroup ( ) { } }

Fix:
return new TopGroups < BytesRef > ( groupSort . getSort ( ) , sortWithinGroup . getSort ( ) , 0 , 0 , new GroupDocs [ 0 ] , Float . NaN ) ;
Buggy code:
public class FileSystemDirectory implements PartitionedDirectoryBackend { private File root ; private String rootPath ; protected final Logger log = LoggerFactory . getLogger ( this . getClass ( ) ) ; private String enc = "utf-8" ; public FileSystemDirectory ( String path , String enc ) { } public FileSystemDirectory ( ) { } public void setRootPath ( String rootPath ) { } public void setEnc ( String enc ) { } public void checkState ( ) { } @ Override @ PostConstruct public void open ( ) { } @ Override @ PreDestroy public void close ( ) { } @ Override public boolean isopen ( ) { } @ Override public void insert ( int partition , List < String > key , List < String > value ) { } @ Override public void delete ( int partition , List < String > key ) { } @ Override public List < String > lookup ( int partition , List < String > key ) { } @ Override public Map < List < String > , List < String > > prefixlookup ( int partition , List < String > key ) { } private void recursive_add ( List < String > key , String dir , Map < List < String > , List < String > > map ) { } private void file_add ( List < String > key , String value , Map < List < String > , List < String > > map ) { } private String _buildpath ( List < String > dir ) { } private List < String > _get_partition_dir ( int partition , List < String > dir ) { } private String _buildfile ( String dir ) { } private String buildfile ( String dir ) { } private String _builddir ( String dir ) { } private String builddir ( String dir ) { } private class PrefixFilter implements FileFilter { private final String prefix ; public PrefixFilter ( String prefix ) { } public boolean accept ( File pathname ) { <START_BUG> return pathname . getName ( ) . substring ( 0 , prefix . length ( ) ) . equals ( prefix ) ; <END_BUG> } } }

Fix:
return ( ( prefix . length ( ) ) <= ( pathname . length ( ) ) ) && ( pathname . getName ( ) . substring ( 0 , prefix . length ( ) ) . equals ( prefix ) ) ;
Buggy code:
public class FieldTermStackTest extends AbstractTestCase { public void test1Term ( ) throws Exception { } public void test2Terms ( ) throws Exception { } public void test1Phrase ( ) throws Exception { } private void makeIndex ( ) throws Exception { } public void test1TermB ( ) throws Exception { } public void test2TermsB ( ) throws Exception { } public void test1PhraseB ( ) throws Exception { } private void makeIndexB ( ) throws Exception { } public void test1PhraseShortMV ( ) throws Exception { makeIndexShortMV ( ) ; FieldQuery fq = new FieldQuery ( tq ( "d" ) , true , true ) ; FieldTermStack stack = new FieldTermStack ( reader , 0 , F , fq ) ; assertEquals ( 1 , stack . termList . size ( ) ) ; <START_BUG> assertEquals ( "d(6,7,3)" , stack . pop ( ) . toString ( ) ) ; <END_BUG> } public void test1PhraseLongMV ( ) throws Exception { } public void test1PhraseMVB ( ) throws Exception { } }

Fix:
assertEquals ( "d(9,10,3)" , stack . pop ( ) . toString ( ) ) ;
Buggy code:
public abstract class MultiEditor extends EditorPart { private int activeEditorIndex ; private IEditorPart [ ] innerEditors ; public MultiEditor ( ) { } public void doSave ( IProgressMonitor monitor ) { } public Composite createInnerPartControl ( Composite parent , final IEditorPart e ) { } public void dispose ( ) { } public void doSaveAs ( ) { } public void init ( IEditorSite site , IEditorInput input ) throws PartInitException { } public void init ( IEditorSite site , MultiEditorInput input ) throws PartInitException { setInput ( input ) ; setSite ( site ) ; <START_BUG> setTitle ( input . getName ( ) ) ; <END_BUG> setTitleToolTip ( input . getToolTipText ( ) ) ; } public boolean isDirty ( ) { } public boolean isSaveAsAllowed ( ) { } public void setFocus ( ) { } public final IEditorPart getActiveEditor ( ) { } public final IEditorPart [ ] getInnerEditors ( ) { } public final void setChildren ( IEditorPart [ ] children ) { } protected void activateEditor ( IEditorPart part ) { } protected int getIndex ( IEditorPart editor ) { } public void updateGradient ( IEditorPart editor ) { } protected abstract void drawGradient ( IEditorPart innerEditor , MultiEditor . Gradient g ) { } protected boolean getShellActivated ( ) { } public static class Gradient { public Color fgColor ; public Color [ ] bgColors ; public int [ ] bgPercents ; } }

Fix:
setPartName ( input . getName ( ) ) ;
Buggy code:
public class Copydir extends MatchingTask { private File srcDir ; private File destDir ; private boolean filtering = false ; private boolean forceOverwrite = false ; private Hashtable filecopyList = new Hashtable ( ) ; public void setSrc ( String src ) { } public void setDest ( String dest ) { } public void setFiltering ( String filter ) { } public void setForceoverwrite ( String force ) { } public void execute ( ) throws BuildException { if ( ( srcDir ) == null ) { throw new BuildException ( "srcdir<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" , location ) ; } if ( ! ( srcDir . exists ( ) ) ) { throw new BuildException ( ( ( "srcdir<seq2seq4repair_space>" + ( srcDir . toString ( ) ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist!" ) , location ) ; } DirectoryScanner ds = super . getDirectoryScanner ( srcDir ) ; String [ ] files = ds . getIncludedFiles ( ) ; scanDir ( srcDir , destDir , files ) ; <START_BUG> project . log ( ( ( ( "Copying<seq2seq4repair_space>" + ( filecopyList . size ( ) ) ) + "<seq2seq4repair_space>files<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( destDir . getAbsolutePath ( ) ) ) ) ; <END_BUG> Enumeration = filecopyList . keys ( ) ; } private void scanDir ( File from , File to , String [ ] files ) { } }

Fix:
log ( ( ( ( "Copying<seq2seq4repair_space>" + ( filecopyList . size ( ) ) ) + "<seq2seq4repair_space>files<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( destDir . getAbsolutePath ( ) ) ) ) ;
Buggy code:
@ Component ( name = "logdb-function-registry" ) @ Provides public class FunctionRegistryImpl implements FunctionRegistry { private final Logger slog = LoggerFactory . getLogger ( FunctionRegistryImpl . class ) ; private ConcurrentHashMap < String , FunctionFactory > factories = new ConcurrentHashMap < String , FunctionFactory > ( ) ; private FunctionRegistryImpl . EmbeddedFunctionFactory embedded = new FunctionRegistryImpl . EmbeddedFunctionFactory ( ) ; public FunctionRegistryImpl ( ) { } @ Override public Set < String > getFunctionNames ( ) { } @ Override public void registerFactory ( FunctionFactory factory ) { } @ Override public void unregisterFactory ( FunctionFactory factory ) { } private static class EmbeddedFunctionFactory implements FunctionFactory { private Map < String , Constructor < ? > > constructors = new HashMap < String , Constructor < ? > > ( ) ; public EmbeddedFunctionFactory ( ) { } private void define ( String name , Class < ? > clazz ) { } @ Override public Set < String > getFunctionNames ( ) { } @ Override public Expression newFunction ( QueryContext ctx , String name , List < Expression > exprs ) { Constructor < ? > c = constructors . get ( name ) ; if ( c == null ) { Map < String , String > params = new HashMap < String , String > ( ) ; params . put ( "function" , name ) ; throw new QueryParseException ( "90900" , ( - 1 ) , ( - 1 ) , params ) ; } try { return ( ( Expression ) ( c . newInstance ( ctx , exprs ) ) ) ; } catch ( InvocationTargetException e ) { if ( ( e . getTargetException ( ) ) instanceof QueryParseException ) throw ( ( QueryParseException ) ( e . getTargetException ( ) ) ) ; else if ( ( e . getTargetException ( ) ) instanceof QueryParseException ) throw ( ( QueryParseException ) ( e . getTargetException ( ) ) ) ; else { Map < String , String > params = new HashMap < String , String > ( ) ; params . put ( "function" , name ) ; params . put ( "msg" , e . getTargetException ( ) . toString ( ) ) ; throw new QueryParseException ( "90901" , ( - 1 ) , ( - 1 ) , params ) ; } } catch ( QueryParseException e ) { throw e ; } catch ( Throwable t ) { Map < String , String > params = new HashMap < String , String > ( ) ; params . put ( "function" , name ) ; params . put ( "msg" , t . toString ( ) ) ; throw new QueryParseException ( "90902" , ( - 1 ) , ( - 1 ) , params ) ; } } } @ Override public Expression newFunction ( QueryContext ctx , String functionName , List < Expression > exprs ) { FunctionFactory ff = factories . get ( functionName ) ; if ( ff == null ) { Map < String , String > params = new HashMap < String , String > ( ) ; params . put ( "function" , functionName ) ; <START_BUG> throw new QueryParseException ( "90903" , ( - 1 ) , ( - 1 ) , params ) ; <END_BUG> } return ff . newFunction ( ctx , functionName , exprs ) ; } }

Fix:
throw new QueryParseException ( "90900" , ( - 1 ) , ( - 1 ) , params ) ;
Buggy code:
public class DRPCSpout implements IRichSpout { public static Logger LOG = Logger . getLogger ( DRPCSpout . class ) ; SpoutOutputCollector _collector ; List < DRPCInvocationsClient > _clients = new ArrayList < DRPCInvocationsClient > ( ) ; String _function ; String _local_drpc_id = null ; private static class DRPCMessageId { String id ; int index ; public DRPCMessageId ( String id , int index ) { } } public DRPCSpout ( String function ) { } public DRPCSpout ( String function , ILocalDRPC drpc ) { } @ Override public void open ( Map conf , TopologyContext context , SpoutOutputCollector collector ) { } @ Override public void close ( ) { } @ Override public void nextTuple ( ) { } @ Override public void ack ( Object msgId ) { } @ Override public void fail ( Object msgId ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { <START_BUG> return new HashMap < String , Object > ( ) ; <END_BUG> } }

Fix:
return null ;
Buggy code:
public class BrowserServlet extends AbstractBrowserServlet { private static Logger log = Logger . getLogger ( AbstractBrowserServlet . class ) ; protected void doDSGet ( Context context , HttpServletRequest request , HttpServletResponse response ) throws IOException , SQLException , ServletException , AuthorizeException { BrowserScope scope = getBrowserScopeForRequest ( context , request , response ) ; <START_BUG> if ( ( scope . getBrowseIndex ( ) ) == null ) { <END_BUG> String requestURL = request . getRequestURI ( ) ; if ( ( request . getQueryString ( ) ) != null ) { requestURL += "?" + ( request . getQueryString ( ) ) ; } BrowserServlet . log . warn ( ( "We<seq2seq4repair_space>were<seq2seq4repair_space>unable<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>the<seq2seq4repair_space>browse<seq2seq4repair_space>request<seq2seq4repair_space>(e.g.<seq2seq4repair_space>an<seq2seq4repair_space>unconfigured<seq2seq4repair_space>index<seq2seq4repair_space>or<seq2seq4repair_space>sort<seq2seq4repair_space>option<seq2seq4repair_space>was<seq2seq4repair_space>used).<seq2seq4repair_space>Will<seq2seq4repair_space>send<seq2seq4repair_space>a<seq2seq4repair_space>400<seq2seq4repair_space>Bad<seq2seq4repair_space>Request.<seq2seq4repair_space>Requested<seq2seq4repair_space>URL<seq2seq4repair_space>was:<seq2seq4repair_space>" + requestURL ) ) ; response . sendError ( SC_BAD_REQUEST ) ; return ; } if ( "submit_export_metadata" . equals ( UIUtil . getSubmitButton ( request , "submit" ) ) ) { exportMetadata ( context , request , response , scope ) ; } else { processBrowse ( context , scope , request , response ) ; } } protected void showError ( Context context , HttpServletRequest request , HttpServletResponse response ) throws IOException , SQLException , ServletException , AuthorizeException { } protected void showNoResultsPage ( Context context , HttpServletRequest request , HttpServletResponse response ) throws IOException , SQLException , ServletException , AuthorizeException { } protected void showSinglePage ( Context context , HttpServletRequest request , HttpServletResponse response ) throws IOException , SQLException , ServletException , AuthorizeException { } protected void showFullPage ( Context context , HttpServletRequest request , HttpServletResponse response ) throws IOException , SQLException , ServletException , AuthorizeException { } protected void exportMetadata ( Context context , HttpServletRequest request , HttpServletResponse response , BrowserScope scope ) throws IOException , ServletException { } }

Fix:
if ( ( scope == null ) || ( ( scope . getBrowseIndex ( ) ) == null ) ) {
Buggy code:
public class UMLModelElementClientDependency implements XMISerializable { private UMLAbstraction umlAbstraction ; public UMLModelElementClientDependency ( UMLAbstraction umlAbstraction ) { } public UMLAbstraction getUmlAbstraction ( ) { } public void setUmlAbstraction ( UMLAbstraction umlAbstraction ) { } @ Override public String toXmi ( ) { StringBuilder sb = new StringBuilder ( ) ; <START_BUG> sb . append ( "<UML:ModelElement.clientDependency>" ) ; <END_BUG> sb . append ( umlAbstraction . toXmi ( ) ) ; sb . append ( "<//UML:ModelElement.clientDependency>\n" ) ; return sb . toString ( ) ; } No newline ; at end ; of file ; }

Fix:
sb . append ( "<UML:ModelElement.clientDependency>\n" ) ;
Buggy code:
public class SolrProducer extends DefaultProducer { private SolrServer httpServer ; private SolrServer concSolrServer ; private SolrServer cloudSolrServer ; public SolrProducer ( SolrEndpoint endpoint , SolrServer solrServer , SolrServer concSolrServer , SolrServer cloudSolrServer ) { } private SolrServer getBestSolrServer ( String operation ) { if ( ( this . cloudSolrServer ) != null ) { return this . cloudSolrServer ; } else <START_BUG> if ( operation == ( SolrConstants . OPERATION_INSERT_STREAMING ) ) { <END_BUG> return this . concSolrServer ; } else { return this . httpServer ; } } @ Override public void process ( Exchange exchange ) throws Exception { } private void insert ( Exchange exchange , SolrServer solrServer ) throws Exception { } private String getRequestHandler ( ) { } @ Override public SolrEndpoint getEndpoint ( ) { } @ Override protected void doShutdown ( ) throws Exception { } }

Fix:
if ( OPERATION_INSERT_STREAMING . equals ( operation ) ) {
Buggy code:
public class BeanDefinitionVisitor { private StringValueResolver valueResolver ; public BeanDefinitionVisitor ( StringValueResolver valueResolver ) { } protected BeanDefinitionVisitor ( ) { } public void visitBeanDefinition ( BeanDefinition beanDefinition ) { } protected void visitParentName ( BeanDefinition beanDefinition ) { } protected void visitBeanClassName ( BeanDefinition beanDefinition ) { } protected void visitFactoryBeanName ( BeanDefinition beanDefinition ) { } protected void visitFactoryMethodName ( BeanDefinition beanDefinition ) { } protected void visitScope ( BeanDefinition beanDefinition ) { } protected void visitPropertyValues ( MutablePropertyValues pvs ) { PropertyValue [ ] pvArray = pvs . getPropertyValues ( ) ; for ( PropertyValue pv : pvArray ) { Object newVal = resolveValue ( pv . getValue ( ) ) ; if ( ! ( ObjectUtils . nullSafeEquals ( newVal , pv . getValue ( ) ) ) ) { <START_BUG> pvs . addPropertyValue ( pv . getName ( ) , newVal ) ; <END_BUG> } } } protected void visitIndexedArgumentValues ( Map < Integer , ConstructorArgumentValues . ValueHolder > ias ) { } protected void visitGenericArgumentValues ( List < ConstructorArgumentValues . ValueHolder > gas ) { } protected Object resolveValue ( Object value ) { } @ SuppressWarnings ( "unchecked" ) protected void visitList ( List listVal ) { } @ SuppressWarnings ( "unchecked" ) protected void visitSet ( Set setVal ) { } @ SuppressWarnings ( "unchecked" ) protected void visitMap ( Map < ? , ? > mapVal ) { } protected String resolveStringValue ( String strVal ) { } }

Fix:
pvs . add ( pv . getName ( ) , newVal ) ;
Buggy code:
public final class JmxSubsystemAdd extends AbstractSubsystemAdd < JmxSubsystemElement > { private static final long serialVersionUID = - 3662389863046074060L ; public JmxSubsystemAdd ( ) { } @ Override protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > resultHandler , final P param ) { <START_BUG> final BatchBuilder batchBuilder = updateContext . getBatchBuilder ( ) ; <END_BUG> MBeanServerService . addService ( batchBuilder ) ; ManagedServiceContainerService . addService ( batchBuilder ) ; } @ Override protected JmxSubsystemElement createSubsystemElement ( ) { } }

Fix:
final BatchBuilder batchBuilder = updateContext . getServiceTarget ( ) ;
Buggy code:
public class SarExtension implements Extension { public static final String NAMESPACE = "urn:jboss:domain:sar:1.0" ; static final SarExtension . SarSubSystemElementParser PARSER = new SarExtension . SarSubSystemElementParser ( ) ; static final SubsystemFactory < SarSubsystemElement > FACTORY = new SubsystemFactory < SarSubsystemElement > ( ) { public SarSubsystemElement createSubsystemElement ( ) { } } ; public void initialize ( ExtensionContext context ) { <START_BUG> context . registerSubsystem ( SarExtension . NAMESPACE , SarExtension . FACTORY , SarExtension . PARSER ) ; <END_BUG> } public void activate ( final ServiceActivatorContext context ) { } static class SarSubSystemElementParser implements XMLElementReader < List < ? super AbstractSubsystemUpdate < SarSubsystemElement , ? > > > { public void readElement ( XMLExtendedStreamReader reader , List < ? super AbstractSubsystemUpdate < SarSubsystemElement , ? > > arg1 ) throws XMLStreamException { } } }

Fix:
context . registerSubsystem ( SarExtension . NAMESPACE , SarExtension . PARSER ) ;