nus-yam/ex-repair huggingface dataset:
Buggy code:
@ SpringFunctionality ( app = ThesisProposalsController . class , title = "title.studentThesisCandidacy.management" , accessGroup = "activeStudents" ) @ RequestMapping ( "//studentCandidacies" ) public class StudentCandidaciesController { @ RequestMapping ( value = "" , method = RequestMethod . GET ) public String listProposals ( Model model ) { } private Set < ThesisProposalsConfiguration > getConfigurationsForRegistration ( Registration reg ) { } @ RequestMapping ( value = "//candidate//{oid}" , method = RequestMethod . POST ) public String createThesisCandidacyForm ( @ PathVariable ( "oid" ) ThesisProposal thesisProposal , @ RequestParam Registration registration , Model model ) throws MaxNumberStudentThesisCandidaciesException , OutOfCandidacyPeriodException { } @ Atomic ( mode = TxMode . WRITE ) public void createStudentThesisCandidacy ( Registration registration , ThesisProposal thesisProposal ) throws MaxNumberStudentThesisCandidaciesException , OutOfCandidacyPeriodException { ThesisProposalsConfiguration thesisProposalsConfiguration = thesisProposal . getSingleThesisProposalsConfiguration ( ) ; if ( ! ( thesisProposalsConfiguration . getCandidacyPeriod ( ) . containsNow ( ) ) ) { throw new OutOfCandidacyPeriodException ( ) ; } else { long candidaciesCount = registration . getStudentThesisCandidacySet ( ) . stream ( ) . filter ( ( candidacy ) -> candidacy . getThesisProposal ( ) . getSingleThesisProposalsConfiguration ( ) . getCandidacyPeriod ( ) . containsNow ( ) ) . count ( ) ; if ( ( ( thesisProposalsConfiguration . getMaxThesisCandidaciesByStudent ( ) ) != ( - 1 ) ) && ( candidaciesCount >= ( thesisProposalsConfiguration . getMaxThesisCandidaciesByStudent ( ) ) ) ) { throw new MaxNumberStudentThesisCandidaciesException ( registration . getStudent ( ) ) ; } else { <START_BUG> StudentThesisCandidacy studentThesisCandidacy = new StudentThesisCandidacy ( registration , ( ( int ) ( candidaciesCount ) ) , thesisProposal ) ; <END_BUG> registration . getStudentThesisCandidacySet ( ) . add ( studentThesisCandidacy ) ; } } } @ RequestMapping ( value = "//delete//{oid}" , method = RequestMethod . GET ) public String deleteThesisCandidacy ( @ PathVariable ( "oid" ) StudentThesisCandidacy studentThesisCandidacy , Model model ) { } @ Atomic ( mode = TxMode . WRITE ) private String delete ( StudentThesisCandidacy studentThesisCandidacy , Model model ) { } @ RequestMapping ( value = "//updatePreferences" , method = RequestMethod . POST ) public String updateStudentThesisCandidaciesWeights ( @ RequestParam String json , Model model ) { } @ Atomic ( mode = TxMode . WRITE ) public void updateStudentThesisCandidaciesWeights ( JsonArray jsonArray ) throws OutOfCandidacyPeriodException { } }

Fix:
StudentThesisCandidacy studentThesisCandidacy = new StudentThesisCandidacy ( registration , ( ( ( int ) ( candidaciesCount ) ) + 1 ) , thesisProposal ) ;
Buggy code:
public class ILCDImport implements FileImport { private Logger log = LoggerFactory . getLogger ( this . getClass ( ) ) ; private File zip ; private IDatabase database ; private boolean importFlows = false ; private boolean canceled = false ; private EventBus eventBus ; public ILCDImport ( File zip , IDatabase database ) { } @ Override public void setEventBus ( EventBus eventBus ) { } @ Override public void cancel ( ) { } public void setImportFlows ( boolean importFlows ) { } @ Override public void run ( ) { } private void tryCloseStore ( ZipStore zipStore ) { } private void tryImportContacts ( ZipStore zipStore ) { } private void importContacts ( ZipStore zipStore ) throws Exception { } private void tryImportSources ( ZipStore zipStore ) { } private void tryImportUnits ( ZipStore zipStore ) { } private void tryImportFlowProperties ( ZipStore zipStore ) { } private void tryImportFlows ( ZipStore zipStore ) { if ( canceled ) return ; try { Iterator < Flow > it = zipStore . iterator ( Flow . class ) ; while ( ( it . hasNext ( ) ) && ( ! ( canceled ) ) ) { Flow flow = it . next ( ) ; fireEvent ( new org . openlca . ilcd . util . FlowBag ( flow ) . getName ( ) ) ; FlowImport flowImport = new FlowImport ( zipStore , database ) ; flowImport . run ( flow ) ; } } catch ( Exception e ) { <START_BUG> log . error ( "Flow<seq2seq4repair_space>import<seq2seq4repair_space>failed" ) ; <END_BUG> } } private void tryImportProcesses ( ZipStore zipStore ) { } private void importProcesses ( ZipStore zipStore ) throws Exception { } private void tryImportMethods ( ZipStore zipStore ) { } private void fireEvent ( String dataSet ) { } }

Fix:
log . error ( "Flow<seq2seq4repair_space>import<seq2seq4repair_space>failed" , e ) ;
Buggy code:
public class Category { private DBConnect dbc ; public Category ( DBConnect dbc ) { } public boolean deleteSub ( int id ) { } public boolean changeCat ( int id , int new_category_ID ) { } public boolean createSub ( String name , int category_ID ) { } public boolean deleteCat ( int id ) { } public boolean createCat ( String name ) { } public ResultSet getAllSubCat ( ) { } public ResultSet getAllCat ( ) { } public ResultSet getEmptyCat ( ) { <START_BUG> String stmt = "SELECT<seq2seq4repair_space>navn,<seq2seq4repair_space>katID<seq2seq4repair_space>FROM<seq2seq4repair_space>kategori<seq2seq4repair_space>" + ( "LEFT<seq2seq4repair_space>JOIN<seq2seq4repair_space>ukategori<seq2seq4repair_space>ON<seq2seq4repair_space>kategori.katID<seq2seq4repair_space>=<seq2seq4repair_space>ukategori.katID<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>ukatID<seq2seq4repair_space>IS<seq2seq4repair_space>NULL;" ) ; <END_BUG> return dbc . getData ( stmt ) ; } public ResultSet getEmptySubCat ( ) { } }

Fix:
String stmt = "SELECT<seq2seq4repair_space>kategori.navn,<seq2seq4repair_space>kategori.katID<seq2seq4repair_space>FROM<seq2seq4repair_space>kategori<seq2seq4repair_space>" + ( "LEFT<seq2seq4repair_space>JOIN<seq2seq4repair_space>ukategori<seq2seq4repair_space>ON<seq2seq4repair_space>kategori.katID<seq2seq4repair_space>=<seq2seq4repair_space>ukategori.katID<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>ukatID<seq2seq4repair_space>IS<seq2seq4repair_space>NULL;" ) ;
Buggy code:
public class TestPropInject extends AbstractSolrTestCase { public String getSchemaFile ( ) { } public String getSolrConfigFile ( ) { } class ExposeWriterHandler extends DirectUpdateHandler2 { public ExposeWriterHandler ( ) throws IOException { } public IndexWriter getWriter ( ) throws IOException { } } public void testMergePolicy ( ) throws Exception { } public void testMergePolicyDefaults ( ) throws Exception { } public void testProps ( ) throws Exception { } public void testPropsDefaults ( ) throws Exception { IndexWriter writer = new TestPropInject . ExposeWriterHandler ( ) . getWriter ( ) ; ConcurrentMergeScheduler cms = ( ( ConcurrentMergeScheduler ) ( writer . getMergeScheduler ( ) ) ) ; <START_BUG> assertEquals ( 10 , cms . getMaxThreadCount ( ) ) ; <END_BUG> } }

Fix:
assertEquals ( 4 , cms . getMaxThreadCount ( ) ) ;
Buggy code:
public class TypeDeclarationStatement extends Statement { public static final ChildPropertyDescriptor TYPE_DECLARATION_PROPERTY = new ChildPropertyDescriptor ( TypeDeclarationStatement . class , "typeDeclaration" , TypeDeclaration . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor DECLARATION_PROPERTY = new ChildPropertyDescriptor ( TypeDeclarationStatement . class , "declaration" , AbstractTypeDeclaration . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private AbstractTypeDeclaration typeDecl = null ; private ChildPropertyDescriptor typeDeclProperty ( ) { } TypeDeclarationStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { TypeDeclarationStatement result = new TypeDeclarationStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setDeclaration ( ( ( AbstractTypeDeclaration ) ( getDeclaration ( ) . clone ( target ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public AbstractTypeDeclaration getDeclaration ( ) { } public void setDeclaration ( AbstractTypeDeclaration decl ) { } public TypeDeclaration getTypeDeclaration ( ) { } final TypeDeclaration internalGetTypeDeclaration ( ) { } public void setTypeDeclaration ( TypeDeclaration decl ) { } final void internalSetTypeDeclaration ( TypeDeclaration decl ) { } public ITypeBinding resolveBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public abstract class Statement extends ASTNode { private String optionalLeadingComment = null ; Statement ( AST ast ) { } public String getLeadingComment ( ) { } public void setLeadingComment ( String comment ) { if ( comment != null ) { char [ ] source = comment . toCharArray ( ) ; <START_BUG> IScanner scanner = ToolFactory . createScanner ( true , true , false , false ) ; <END_BUG> scanner . resetTo ( 0 , source . length ) ; scanner . setSource ( source ) ; try { int token ; boolean onlyOneComment = false ; while ( ( token = scanner . getNextToken ( ) ) != ( ITerminalSymbols . TokenNameEOF ) ) { switch ( token ) { case ITerminalSymbols . TokenNameCOMMENT_BLOCK : case ITerminalSymbols . TokenNameCOMMENT_JAVADOC : case ITerminalSymbols . TokenNameCOMMENT_LINE : if ( onlyOneComment ) { throw new IllegalArgumentException ( ) ; } onlyOneComment = true ; break ; default : onlyOneComment = false ; } } if ( ! onlyOneComment ) { throw new IllegalArgumentException ( ) ; } } catch ( InvalidInputException e ) { throw new IllegalArgumentException ( ) ; } } modifying ( ) ; this . optionalLeadingComment = comment ; } int memSize ( ) { } }

Fix:
IScanner scanner = ToolFactory . createScanner ( true , true , false , false , true ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class WSTestCase { @ Deployment ( testable = false ) public static Archive < ? > getDeployment ( ) { } @ Test public void testWSDL ( ) throws Exception { } @ Test <START_BUG> @ Ignore ( "Fix<seq2seq4repair_space>endpoint<seq2seq4repair_space>access" ) <END_BUG> public void testAccess ( ) throws Exception { URL wsdlURL = new URL ( "http:////localhost:8080//ws-example?wsdl" ) ; QName serviceName = new QName ( "http:////archive.ws.demos.as.jboss.org//" , "EndpointService" ) ; Service service = Service . create ( wsdlURL , serviceName ) ; Endpoint port = ( ( Endpoint ) ( service . getPort ( Endpoint . class ) ) ) ; Assert . assertEquals ( "Foo" , port . echo ( "Foo" ) ) ; } private static String performCall ( String params , String request ) throws Exception { } }

Fix:
@ Ignore ( "[AS7-814]<seq2seq4repair_space>Fix<seq2seq4repair_space>or<seq2seq4repair_space>remove<seq2seq4repair_space>ignored<seq2seq4repair_space>smoke<seq2seq4repair_space>tests" )
Buggy code:
public class ECMLActivity extends Activity { final Context context = this ; private static String sdcardPath = "sdcard//" ; private static String ECMLPath = "ECML//" ; private static final String AUDIO_RECORDER_FOLDER = "AudioRecords" ; private static final String VIDEO_RECORDER_FOLDER = "VideoRecords" ; private static final String MUSIC_SHEET_FOLDER = "MusicSheets" ; static Integer nbActivities = 0 ; public static final String PRACTICE_ALONE = "PI" ; public static final String PRACTICE_WITH_ACCOMPANIMENT = "PA" ; public static final String CHECK_WITH_YOUR_TEACHER = "C" ; public static final String READING_OF_NOTES = "R" ; public static final String SPEED_GAME = "S" ; public static final String CHOOSE_SONG = "chooseSong" ; public static final String READING_OF_NOTES_BEGINNER = "reading" ; private static Bitmap playAloneImage ; private static Bitmap playAccompaniedImage ; private static Bitmap readingOfNotesImage ; private static Bitmap checkWithTeacherImage ; private static Bitmap leftImage ; private static Bitmap rightImage ; private boolean displayed ; private LinearLayout sequenceOfActivities ; private int stripeHeight ; private int iconWidth ; private int iconHeight ; private int leftMargin ; private String song ; private ImageView chooseSong ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { if ( ( item . getItemId ( ) ) == ( id . login ) ) { launchLogin ( ) ; return true ; } else if ( ( item . getItemId ( ) ) == ( id . studentActivity ) ) { launchStudentActivity ( ) ; return true ; } else if ( ( item . getItemId ( ) ) == ( android . R . id . home ) ) { AlertDialog . Builder alertBuilder = new AlertDialog . Builder ( this ) ; final AlertDialog alert = alertBuilder . create ( ) ; alert . setMessage ( "Are<seq2seq4repair_space>you<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>close<seq2seq4repair_space>ECML<seq2seq4repair_space>?" ) ; alert . setButton ( BUTTON_POSITIVE , "Yes" , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialogInterface , int i ) { <START_BUG> finish ( ) ; <END_BUG> } } ) ; alert . setButton ( BUTTON_NEGATIVE , "No" , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialogInterface , int i ) { alert . cancel ( ) ; } } ) ; alert . show ( ) ; } return true ; } private void launchStudentActivity ( ) { } private void launchLogin ( ) { } private static void loadImages ( Context context ) { } private void sequenceOfActivities ( ) { } private void addButton ( ActivityParameters parameters ) { } private void setButton ( Bitmap image , final String toDo , final ActivityParameters parameters ) { } private void setTriangle ( Bitmap image ) { } protected void onResume ( ) { } }

Fix:
finishAffinity ( ) ;
Buggy code:
public class RegexpMatcherFactory { public RegexpMatcherFactory ( ) { } public RegexpMatcher newRegexpMatcher ( ) throws BuildException { } public RegexpMatcher newRegexpMatcher ( Project p ) throws BuildException { } protected RegexpMatcher createInstance ( String className ) throws BuildException { try { Class implClass = Class . forName ( className ) ; return ( ( RegexpMatcher ) ( implClass . newInstance ( ) ) ) ; } catch ( Throwable t ) { <START_BUG> throw new BuildException ( t ) ; <END_BUG> } } }

Fix:
throw new BuildException ( "Error" , t ) ;
Buggy code:
public class OutputArea extends JTextArea { private static final long serialVersionUID = 2089727694026951376L ; private static final String LE = System . getProperty ( "line.separator" ) ; public OutputArea ( ) { } public void addLine ( String txt ) { <START_BUG> setText ( ( ( txt + ( OutputArea . LE ) ) + ( getText ( ) ) ) ) ; <END_BUG> } }

Fix:
setText ( ( ( ( "><seq2seq4repair_space>" + txt ) + ( OutputArea . LE ) ) + ( getText ( ) ) ) ) ;
Buggy code:
public class RemoteServiceTrackerTest extends AbstractServiceTrackerTest { RemoteServiceTracker remoteServiceTracker ; protected String getClientContainerName ( ) { <START_BUG> return Generic . CLIENT_CONTAINER_NAME ; <END_BUG> } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } protected IRemoteService getRemoteService ( IRemoteServiceContainerAdapter adapter , String clazz , String filter ) { } }

Fix:
return Generic . CONSUMER_CONTAINER_TYPE ;
Buggy code:
public class SpellCheckerRequestHandler extends RequestHandlerBase { private SpellChecker spellChecker ; private static IndexReader reader = null ; private String restrictToField = null ; private boolean onlyMorePopular = false ; private String spellcheckerIndexDir ; private String termSourceField ; private static final float DEFAULT_ACCURACY = 0.5F ; private static final int DEFAULT_NUM_SUGGESTIONS = 1 ; public void init ( NamedList args ) { super . init ( args ) ; SolrParams p = SolrParams . toSolrParams ( args ) ; <START_BUG> restrictToField = p . get ( "termSourceField" ) ; <END_BUG> spellcheckerIndexDir = p . get ( "spellcheckerIndexDir" ) ; try { spellChecker = new SpellChecker ( FSDirectory . getDirectory ( spellcheckerIndexDir ) ) ; } catch ( IOException e ) { throw new RuntimeException ( "Cannot<seq2seq4repair_space>open<seq2seq4repair_space>SpellChecker<seq2seq4repair_space>index" , e ) ; } } public void handleRequestBody ( SolrQueryRequest req , SolrQueryResponse rsp ) throws Exception { } private void rebuild ( SolrQueryRequest req ) throws IOException { } public String getVersion ( ) { } public String getDescription ( ) { } public String getSourceId ( ) { } public String getSource ( ) { } public URL [ ] getDocs ( ) { } }

Fix:
termSourceField = p . get ( "termSourceField" ) ;
Buggy code:
class JmxSubsystemElement extends AbstractSubsystemElement < JmxSubsystemElement > { private static final Logger log = Logger . getLogger ( "org.jboss.as.jmx" ) ; public JmxSubsystemElement ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } public void activate ( final ServiceActivatorContext context ) { JmxSubsystemElement . log . info ( "Activating<seq2seq4repair_space>the<seq2seq4repair_space>JMX<seq2seq4repair_space>Subsystem" ) ; final BatchBuilder batchBuilder = context . getBatchBuilder ( ) ; <START_BUG> batchBuilder . addService ( MBEAN_SERVER_SERVICE_NAME , new MBeanServerService ( ) ) . setInitialMode ( IMMEDIATE ) ; <END_BUG> } public long elementHash ( ) { } protected Class < JmxSubsystemElement > getElementClass ( ) { } public void writeContent ( final XMLExtendedStreamWriter streamWriter ) throws XMLStreamException { } }

Fix:
batchBuilder . addService ( SERVICE_NAME , new MBeanServerService ( ) ) . setInitialMode ( IMMEDIATE ) ;
Buggy code:
class PackageDeclaration extends SourceRefElement implements IPackageDeclaration { protected PackageDeclaration ( CompilationUnit parent , String name ) { } public boolean equals ( Object o ) { } protected boolean equalsDOMNode ( IDOMNode node ) { } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { CompilationUnit cu = ( ( CompilationUnit ) ( getAncestor ( IJavaElement . COMPILATION_UNIT ) ) ) ; if ( checkOwner && ( cu . isPrimary ( ) ) ) return this ; <START_BUG> return cu . getPackageDeclaration ( fName ) ; <END_BUG> } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
return cu . getPackageDeclaration ( this . name ) ;
Buggy code:
@ ManagedBean @ ViewScoped public class DeleteAirportBean { public DeleteAirportBean ( ) { } private int id ; private String name ; private String code ; private String country ; private int city ; @ Autowired @ ManagedProperty ( "#{countryService}" ) private CountryService countryService ; @ Autowired @ ManagedProperty ( "#{cityService}" ) private CityService cityService ; @ Autowired @ ManagedProperty ( "#{airportService}" ) private AirportService airportService ; private List < CountryEntity > countries ; private List < CityEntity > cities ; public String getName ( ) { } public void setName ( String name ) { } public String getCode ( ) { } public void setCode ( String code ) { } public String getCountry ( ) { } public void setCountry ( String country ) { } public List < CountryEntity > getCountries ( ) { } public void setCountries ( List < CountryEntity > countries ) { } public List < CityEntity > getCities ( ) { } public void setCities ( List < CityEntity > cities ) { } public int getCity ( ) { } public void setCity ( int city ) { } public CountryService getCountryService ( ) { } public void setCountryService ( CountryService countryService ) { } public CityService getCityService ( ) { } public void setCityService ( CityService cityService ) { } public AirportService getAirportService ( ) { } public void setAirportService ( AirportService airportService ) { } @ PostConstruct public void init ( ) { } public String deleteAirportAction ( ) { if ( ( this . airportService . deleteAirport ( this . id ) ) == true ) { } else { } <START_BUG> return "airport" ; <END_BUG> } }

Fix:
return "//airport//index?faces-redirect=true" ;
Buggy code:
public class TextFeedbackTest extends TestCase { OutputStream output ; TestRunner runner ; static class TestResultPrinter extends ResultPrinter { TestResultPrinter ( PrintStream writer ) { } protected String elapsedTimeAsString ( long runTime ) { } } public static void main ( String [ ] args ) { } public void setUp ( ) { } public void testEmptySuite ( ) { } public void testOneTest ( ) { } public void testTwoTests ( ) { String expected = expected ( new String [ ] { ".." , "Time:<seq2seq4repair_space>0" , "" , "OK<seq2seq4repair_space>(2<seq2seq4repair_space>tests)" , "" } ) ; TestSuite suite = new TestSuite ( ) ; suite . addTest ( new TestCase ( ) { public void runTest ( ) { } } ) ; suite . addTest ( new TestCase ( ) { public void runTest ( ) { } } ) ; runner . doRun ( suite ) ; <START_BUG> assertEquals ( expected . toString ( ) , output . toString ( ) ) ; <END_BUG> } public void testFailure ( ) { } public void testError ( ) { } private String expected ( String [ ] lines ) { } }

Fix:
assertEquals ( expected , output . toString ( ) ) ;
Buggy code:
public class PageOpenKey extends WizardPage implements Listener { public static final String PAGE_NAME = "SignPageOpenKey" ; private String project ; private Button bOpen = null ; private Button bEchoKeyStorePassword = null ; private Button bEchoKeyPassword = null ; private Text tKeyStore = null ; private Text tKeyStorePassword = null ; private Text tKeyPassword = null ; private Text tKeyName = null ; private String keyAlgorithm = "" ; private static final int LABELWIDTH = 120 ; private static final String SETTING_KEYSTORE = "sign_keystore" ; private static final String SETTING_KEY_ALIAS = "sign_key_alias" ; private Signature signature = null ; private Keystore keystore = null ; public PageOpenKey ( final Signature signature , final String project ) { } public void createControl ( final Composite parent ) { } private void createPageContent ( final Composite parent ) { } private void addListeners ( ) { } private void dialogChanged ( ) { if ( ( tKeyStore . getText ( ) . length ( ) ) == 0 ) { updateStatus ( selectKeyFile ) ; return ; } if ( ( tKeyStorePassword . getText ( ) . length ( ) ) == 0 ) { updateStatus ( enterKeystorePassword ) ; return ; } if ( ( tKeyName . getText ( ) . length ( ) ) == 0 ) { updateStatus ( enterKeyAlias ) ; return ; } if ( ( tKeyPassword . getText ( ) . length ( ) ) == 0 ) { updateStatus ( enterKeyPassword ) ; return ; } if ( new File ( tKeyStore . getText ( ) ) . exists ( ) ) { try { <START_BUG> keystore = new Keystore ( tKeyStore . getText ( ) , tKeyStorePassword . getText ( ) , "JCEKS" ) ; <END_BUG> keystore . load ( ) ; if ( ! ( keystore . containsKey ( tKeyName . getText ( ) ) ) ) { setErrorMessage ( verifyKeyAlias ) ; return ; } } catch ( Exception ex ) { setErrorMessage ( verifyAll ) ; return ; } } else { updateStatus ( keyStoreNotFound ) ; return ; } setErrorMessage ( null ) ; updateStatus ( null ) ; } private void updateStatus ( final String message ) { } public void handleEvent ( final Event e ) { } private void echoPassword ( final Event e ) { } private void openKeystore ( ) { } public IWizardPage getNextPage ( ) { } private void saveDataToModel ( ) { } private void loadSettings ( ) { } protected void storeSettings ( ) { } }

Fix:
keystore = new Keystore ( tKeyStore . getText ( ) , tKeyStorePassword . getText ( ) , Globals . KEYSTORE_TYPE ) ;
Buggy code:
public class CommunitySignIn extends BasicTest { @ Test ( dataProvider = "logInData" ) public void testSignIn ( String username , String password , String message ) throws Exception { boolean testFail = false ; WebCommunityBaseView mobileView = null ; if ( ( this . driver ) == null ) { Assert . fail ( ( "Device<seq2seq4repair_space>not<seq2seq4repair_space>available:<seq2seq4repair_space>" + ( caps ) ) ) ; } try { mobileView = new WebCommunityBaseView ( driver ) ; mobileView = mobileView . init ( ) ; mobileView = mobileView . login ( username , password ) ; String welcomeMessage = mobileView . getWelcomeMessage ( ) ; if ( welcomeMessage . equals ( message ) ) { resultSheet . setResultByColumnName ( true , this . testName , username , password , message ) ; } else { resultSheet . setResultByColumnName ( false , this . testName , username , password , message ) ; String errorFile = reportFail ( message , welcomeMessage ) ; resultSheet . addScreenshotByRowNameAsLink ( errorFile , this . testName , username , password , message ) ; testFail = true ; } } catch ( Exception e ) { resultSheet . setResultByColumnName ( false , this . testName , username , password , message ) ; testFail = true ; String errorFile = PerfectoUtils . takeScreenshot ( driver ) ; resultSheet . addScreenshotByRowNameAsLink ( errorFile , this . testName , username , password , message ) ; Reporter . log ( e . toString ( ) ) ; Reporter . log ( ( "Error<seq2seq4repair_space>screenshot<seq2seq4repair_space>saved<seq2seq4repair_space>in<seq2seq4repair_space>file:<seq2seq4repair_space>" + errorFile ) ) ; <START_BUG> Reporter . log ( ( ( "<br><seq2seq4repair_space><img<seq2seq4repair_space>src=" + errorFile ) + ".png<seq2seq4repair_space>style=\"max-width:50%;max-height:50%\"<seq2seq4repair_space>//><seq2seq4repair_space><br>" ) ) ; <END_BUG> } if ( testFail ) { Assert . fail ( ) ; } } @ DataProvider ( name = "logInData" , parallel = false ) public Object [ ] [ ] searchItemsData ( ) { } @ Factory ( dataProvider = "factoryData" ) public CommunitySignIn ( DesiredCapabilities caps ) { } }

Fix:
Reporter . log ( ( ( "<br><seq2seq4repair_space><img<seq2seq4repair_space>src=" + errorFile ) + "<seq2seq4repair_space>style=\"max-width:50%;max-height:50%\"<seq2seq4repair_space>//><seq2seq4repair_space><br>" ) ) ;
Buggy code:
public class BinaryMatrix { private static int BLOCK_ADDRESS_BITS = 6 ; private static int BLOCK_SIZE = 1 << ( BinaryMatrix . BLOCK_ADDRESS_BITS ) ; private static int BLOCK_MASK = ( BinaryMatrix . BLOCK_SIZE ) - 1 ; private int rows ; private int cols ; private int widthAddressBits ; private long [ ] matrix ; public BinaryMatrix ( int rows , int cols ) { } public BinaryMatrix ( String [ ] matrix , char significant ) { } protected void initMatrix ( ) { } public void setBit ( int row , int col ) { } public void clearBit ( int row , int col ) { } public boolean isBitSet ( int row , int col ) { <START_BUG> return ( ( matrix [ ( ( row << ( widthAddressBits ) ) + ( col > > > ( BinaryMatrix . BLOCK_ADDRESS_BITS ) ) ) ] ) & ( 1L << ( col & ( BinaryMatrix . BLOCK_MASK ) ) ) ) > 0 ; <END_BUG> } public int bitCount ( int firstRow , int lastRow , int firstColumn , int lastColumn ) { } No newline ; at end ; of file ; }

Fix:
return ( ( matrix [ ( ( row << ( widthAddressBits ) ) + ( col > > > ( BinaryMatrix . BLOCK_ADDRESS_BITS ) ) ) ] ) & ( 1L << ( col & ( BinaryMatrix . BLOCK_MASK ) ) ) ) != 0 ;
Buggy code:
public final class OutputUtils { private OutputUtils ( ) { } public static Path prepareOutput ( FileSystem fs ) throws IOException { Path outpath = new Path ( fs . getWorkingDirectory ( ) , "output" ) ; if ( fs . exists ( outpath ) ) { <START_BUG> FileUtil . fullyDelete ( fs , outpath ) ; <END_BUG> } return outpath ; } public static Path [ ] listOutputFiles ( FileSystem fs , Path outpath ) throws IOException { } public static void importEvaluations ( FileSystem fs , JobConf conf , Path outpath , List < Double > evaluations ) throws IOException { } }

Fix:
fs . delete ( outpath , true ) ;
Buggy code:
public class TSIGRecord extends Record { private static TSIGRecord member = new TSIGRecord ( ) ; private Name alg ; private Date timeSigned ; private short fudge ; private byte [ ] signature ; private int originalID ; private short error ; private byte [ ] other ; private TSIGRecord ( ) { } private TSIGRecord ( Name name , short dclass , int ttl ) { } static TSIGRecord getMember ( ) { } public TSIGRecord ( Name name , short dclass , int ttl , Name alg , Date timeSigned , short fudge , byte [ ] signature , int originalID , short error , byte [ ] other ) { } Record rrFromWire ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in ) throws IOException { } Record rdataFromString ( Name name , short dclass , int ttl , Tokenizer st , Name origin ) throws IOException { <START_BUG> throw new TextParseException ( "no<seq2seq4repair_space>text<seq2seq4repair_space>format<seq2seq4repair_space>defined<seq2seq4repair_space>for<seq2seq4repair_space>TSIG" ) ; <END_BUG> } public String rdataToString ( ) { } public Name getAlgorithm ( ) { } public Date getTimeSigned ( ) { } public short getFudge ( ) { } public byte [ ] getSignature ( ) { } public int getOriginalID ( ) { } public short getError ( ) { } public byte [ ] getOther ( ) { } void rrToWire ( DataByteOutputStream out , Compression c , boolean canonical ) { } }

Fix:
throw st . exception ( "no<seq2seq4repair_space>text<seq2seq4repair_space>format<seq2seq4repair_space>defined<seq2seq4repair_space>for<seq2seq4repair_space>TSIG" ) ;
Buggy code:
public class FilterSave extends JDialogCentered { private enum FilterSaveAction { SAVE , CANCEL ; } private final EventList < String > filters ; private final List < String > defaultFilters = new ArrayList < String > ( ) ; private final JComboBox jName ; private final JButton jSave ; private String returnString ; public FilterSave ( final Window window ) { } String show ( final List < String > filters , final List < String > defaultFilters ) { } private boolean validate ( ) { String name = ( ( String ) ( jName . getSelectedItem ( ) ) ) ; if ( name == null ) { JOptionPane . showMessageDialog ( this . getDialog ( ) , GuiShared . get ( ) . noFilterName ( ) , GuiShared . get ( ) . saveFilter ( ) , JOptionPane . PLAIN_MESSAGE ) ; return false ; } if ( name . isEmpty ( ) ) { JOptionPane . showMessageDialog ( this . getDialog ( ) , GuiShared . get ( ) . noFilterName ( ) , GuiShared . get ( ) . saveFilter ( ) , JOptionPane . PLAIN_MESSAGE ) ; return false ; } for ( String filter : defaultFilters ) { if ( filter . toLowerCase ( ) . equals ( name . toLowerCase ( ) ) ) { JOptionPane . showMessageDialog ( this . getDialog ( ) , GuiShared . get ( ) . overwriteDefaultFilter ( ) , GuiShared . get ( ) . saveFilter ( ) , JOptionPane . PLAIN_MESSAGE ) ; return false ; } } try { filters . getReadWriteLock ( ) . readLock ( ) . lock ( ) ; if ( filters . contains ( name ) ) { int nReturn = JOptionPane . showConfirmDialog ( this . getDialog ( ) , GuiShared . get ( ) . overwrite ( ) , GuiShared . get ( ) . overwriteFilter ( ) , JOptionPane . YES_NO_OPTION , JOptionPane . PLAIN_MESSAGE ) ; if ( nReturn == ( JOptionPane . NO_OPTION ) ) { return false ; } } } finally { <START_BUG> filters . getReadWriteLock ( ) . readLock ( ) . lock ( ) ; <END_BUG> } return true ; } @ Override protected JComponent getDefaultFocus ( ) { } @ Override protected JButton getDefaultButton ( ) { } @ Override protected void windowShown ( ) { } @ Override protected void save ( ) { } @ Override public void setVisible ( final boolean b ) { } private class ListenerClass implements ActionListener { @ Override public void actionPerformed ( final ActionEvent e ) { } } private static class Filterator implements TextFilterator < String > { @ Override public void getFilterStrings ( final List < String > baseList , final String element ) { } } }

Fix:
filters . getReadWriteLock ( ) . readLock ( ) . unlock ( ) ;
Buggy code:
public abstract class SSTable { static final Logger logger = LoggerFactory . getLogger ( SSTable . class ) ; public static final String COMPONENT_DATA = DATA . repr ; public static final String COMPONENT_INDEX = PRIMARY_INDEX . repr ; public static final String COMPONENT_FILTER = FILTER . repr ; public static final String COMPONENT_STATS = STATS . repr ; public static final String TEMPFILE_MARKER = "tmp" ; public static final Comparator < SSTableReader > maxTimestampComparator = new Comparator < SSTableReader > ( ) { public int compare ( SSTableReader o1 , SSTableReader o2 ) { } } ; public final Descriptor descriptor ; protected final Set < Component > components ; public final CFMetaData metadata ; public final IPartitioner partitioner ; public final boolean compression ; public DecoratedKey first ; public DecoratedKey last ; protected SSTable ( Descriptor descriptor , CFMetaData metadata , IPartitioner partitioner ) { } protected SSTable ( Descriptor descriptor , Set < Component > components , CFMetaData metadata , IPartitioner partitioner ) { } public static final Comparator < SSTableReader > sstableComparator = new Comparator < SSTableReader > ( ) { public int compare ( SSTableReader o1 , SSTableReader o2 ) { } } ; public static final Ordering < SSTableReader > sstableOrdering = Ordering . from ( SSTable . sstableComparator ) ; public static boolean delete ( Descriptor desc , Set < Component > components ) throws IOException { } public static DecoratedKey < ? > getMinimalKey ( DecoratedKey < ? > key ) { } public String getFilename ( ) { } public String getColumnFamilyName ( ) { } public String getTableName ( ) { } public static Pair < Descriptor , Component > tryComponentFromFilename ( File dir , String name ) { } static Set < Component > componentsFor ( final Descriptor desc , final Descriptor . TempState matchState ) { } static long estimateRowsFromData ( Descriptor desc , RandomAccessReader dfile ) throws IOException { } static long estimateRowsFromIndex ( RandomAccessReader ifile ) throws IOException { } public static long getTotalBytes ( Iterable < SSTableReader > sstables ) { long sum = 0 ; for ( SSTableReader sstable : sstables ) { <START_BUG> sum += sstable . length ( ) ; <END_BUG> } return sum ; } public long bytesOnDisk ( ) { } @ Override public String toString ( ) { } }

Fix:
sum += sstable . onDiskLength ( ) ;
Buggy code:
public class NSImageRep extends NSObject { public NSImageRep ( ) { } public NSImageRep ( int id ) { } public NSImageRep ( id id ) { } public int bitsPerSample ( ) { } public boolean hasAlpha ( ) { <START_BUG> return ( OS . objc_msgSend ( this . id , sel_hasAlpha ) ) != 0 ; <END_BUG> } public int pixelsHigh ( ) { } public int pixelsWide ( ) { } }

Fix:
return OS . objc_msgSend_bool ( this . id , sel_hasAlpha ) ;
Buggy code:
public class PropertySetter { public static final int NOT_FOUND = 0 ; public static final int AS_PROPERTY = 1 ; public static final int AS_COLLECTION = 2 ; Logger logger ; protected Object obj ; protected Class objClass ; protected PropertyDescriptor [ ] propertyDescriptors ; protected MethodDescriptor [ ] methodDescriptors ; public PropertySetter ( Object obj ) { } protected void introspect ( ) { } public static void setProperties ( Object obj , Properties properties , String prefix ) { } public void setProperties ( Properties properties , String prefix ) { } Logger getLogger ( ) { <START_BUG> if ( ( logger ) != null ) { <END_BUG> logger = LogManager . getLogger ( this . getClass ( ) . getName ( ) ) ; } return logger ; } public void setProperty ( String name , String value ) { } public void setProperty ( PropertyDescriptor prop , String name , String value ) throws PropertySetterException { } public int canContainComponent ( String name ) { } public Class getObjClass ( ) { } public void addComponent ( String name , Object childComponent ) { } public void setComponent ( String name , Object childComponent ) { } String capitalizeFirstLetter ( String name ) { } protected Object convertArg ( String val , Class type ) { } protected Method getMethod ( String methodName ) { } protected PropertyDescriptor getPropertyDescriptor ( String name ) { } }

Fix:
if ( ( logger ) == null ) {
Buggy code:
public class BasicLocation implements Location { private static String DEFAULT_LOCK_FILENAME = ".metadata//.lock" ; private final boolean isReadOnly ; private final URL defaultValue ; private final String property ; private final String dataAreaPrefix ; private final EquinoxConfiguration environmentInfo ; private final boolean debug ; private URL location = null ; private Location parent ; private File lockFile ; private Locker locker ; public BasicLocation ( String property , URL defaultValue , boolean isReadOnly , String dataAreaPrefix , EquinoxConfiguration environmentInfo ) { } public boolean allowsDefault ( ) { } public URL getDefault ( ) { } public synchronized Location getParentLocation ( ) { } public synchronized URL getURL ( ) { } public synchronized boolean isSet ( ) { } public boolean isReadOnly ( ) { } public boolean setURL ( URL value , boolean lock ) throws IllegalStateException { } public synchronized boolean set ( URL value , boolean lock ) throws IOException , IllegalStateException { } public synchronized boolean set ( URL value , boolean lock , String lockFilePath ) throws IOException , IllegalStateException { } public synchronized void setParent ( Location value ) { } public synchronized boolean lock ( ) throws IOException { } public synchronized boolean isLocked ( ) throws IOException { } private boolean lock ( File lock , URL locationValue ) throws IOException { } private boolean isLocked ( File lock ) throws IOException { } private void setLocker ( File lock ) { } public synchronized void release ( ) { } public Location createLocation ( Location parentLocation , URL defaultLocation , boolean readonly ) { } public URL getDataArea ( String filename ) throws IOException { URL base = getURL ( ) ; if ( base == null ) throw new IOException ( Msg . location_notSet ) ; String prefix = base . toExternalForm ( ) ; if ( ( ( prefix . length ( ) ) > 0 ) && ( ( prefix . charAt ( ( ( prefix . length ( ) ) - 1 ) ) ) != '//' ) ) prefix += '//' ; filename = filename . replace ( '\\' , '//' ) ; if ( ( ( filename . length ( ) ) > 0 ) && ( ( filename . charAt ( 0 ) ) == '//' ) ) filename . substring ( 1 ) ; <START_BUG> return new URL ( ( ( prefix + ( dataAreaPrefix ) ) + filename ) ) ; <END_BUG> } }

Fix:
return LocationHelper . buildURL ( ( ( prefix + ( dataAreaPrefix ) ) + filename ) , false ) ;
Buggy code:
public class ScarabModulePeer extends org . tigris . scarab . om . BaseScarabModulePeer { public static Class getOMClass ( ) throws Exception { <START_BUG> return ModuleManager . getModuleClass ( ) ; <END_BUG> } public static List getAllModules ( ) throws Exception { } public static boolean checkExists ( Group group ) throws Exception , DataBackendException { } }

Fix:
return ModuleManager . getOMClass ( ) ;
Buggy code:
public class BlockTinyChest extends BlockContainer implements ITileEntityProvider { protected String textureName ; private boolean isLockable ; public BlockTinyChest ( Material mat , String textureName , boolean isLockable ) { } @ Override public TileEntity createNewTileEntity ( World world , int metaData ) { } @ Override public AxisAlignedBB getCollisionBoundingBoxFromPool ( World world , int x , int y , int z ) { } @ Override @ SideOnly ( Side . CLIENT ) public AxisAlignedBB getSelectedBoundingBoxFromPool ( World world , int x , int y , int z ) { } @ Override public void setBlockBoundsBasedOnState ( IBlockAccess world , int x , int y , int z ) { } public void updateChestBounds ( int meta ) { } @ Override public boolean renderAsNormalBlock ( ) { } @ Override public boolean isOpaqueCube ( ) { } @ Override public int getRenderType ( ) { } @ Override public boolean onBlockActivated ( World world , int x , int y , int z , EntityPlayer player , int par6 , float par7 , float par8 , float par9 ) { if ( ( ( player . isSneaking ( ) ) && ( ( player . getCurrentEquippedItem ( ) ) != null ) ) || ( world . isSideSolid ( x , ( y + 1 ) , z , DOWN ) ) ) { return true ; } if ( world . isRemote ) { return true ; } else { if ( ( ! ( world . isRemote ) ) && ( ( world . getTileEntity ( x , y , z ) ) instanceof TileEntityTinyChest ) ) { TileEntityTinyChest tileEntity = ( ( TileEntityTinyChest ) ( world . getTileEntity ( x , y , z ) ) ) ; if ( tileEntity . hasUniqueOwner ( ) ) { if ( tileEntity . getUniqueOwner ( ) . equals ( ( ( player . getUniqueID ( ) . toString ( ) ) + ( player . getDisplayName ( ) ) ) ) ) { player . openGui ( instance , TINY_CHEST . ordinal ( ) , world , x , y , z ) ; } else { PlayerHelper . sendChatMessage ( player , "This<seq2seq4repair_space>chest<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>belong<seq2seq4repair_space>to<seq2seq4repair_space>you!<seq2seq4repair_space>Back<seq2seq4repair_space>off!" ) ; } } else { player . openGui ( instance , TINY_CHEST . ordinal ( ) , world , x , y , z ) ; } } <START_BUG> return false ; <END_BUG> } } @ Override public boolean onBlockEventReceived ( World world , int x , int y , int z , int eventId , int eventData ) { } @ Override public float getPlayerRelativeBlockHardness ( EntityPlayer player , World world , int x , int y , int z ) { } @ Override public void breakBlock ( World world , int x , int y , int z , Block block , int meta ) { } @ Override public void onBlockPlacedBy ( World world , int x , int y , int z , EntityLivingBase entityLiving , ItemStack itemStack ) { } protected void dropInventory ( World world , int x , int y , int z ) { } @ Override public void registerBlockIcons ( IIconRegister iconRegister ) { } @ Override public void getSubBlocks ( Item item , CreativeTabs creativeTabs , List list ) { } @ Override public int damageDropped ( int metaData ) { } @ Override public String getTextureName ( ) { } public boolean getIsLockable ( ) { } }

Fix:
return true ;
Buggy code:
public class ColorTeamingBridge implements Listener { private BattlePoints battlepoints ; private ColorTeaming colorteaming ; private HashMap < String , String > membersCache ; private ColorTeamingBridge ( ) { } public static ColorTeamingBridge load ( BattlePoints battlepoints , Plugin colorteaming ) { } public boolean doTeaming ( CommandSender sender , int numberOfGroups ) { } @ EventHandler public void onTeamSet ( ColorTeamingPlayerAddEvent event ) { } @ EventHandler public void onTeamWin ( ColorTeamingWonTeamEvent event ) { } @ EventHandler public void onTeamLeaderWin ( ColorTeamingWonLeaderEvent event ) { } @ EventHandler public void onKillTrophy ( ColorTeamingTrophyKillEvent event ) { } private void sendBonusPointToWonTeam ( String team , String displayName ) { int bonus = battlepoints . getBPConfig ( ) . getWinTeamBonusPoint ( ) ; if ( bonus <= 0 ) { return ; } ArrayList < String > playerNames = new ArrayList < String > ( ) ; for ( String name : membersCache . keySet ( ) ) { if ( membersCache . get ( name ) . equals ( team ) ) { playerNames . add ( name ) ; } } if ( ( playerNames . size ( ) ) == 0 ) { return ; } for ( String name : playerNames ) { @ SuppressWarnings ( "deprecation" ) Player player = Bukkit . getPlayerExact ( name ) ; if ( player == null ) { continue ; } battlepoints . addPoint ( ColorTeamingBridge . getOfflinePlayer ( name ) , bonus ) ; <START_BUG> BPUserData data = BPUserData . getData ( ColorTeamingBridge . getOfflinePlayer ( name ) ) ; <END_BUG> sendMessage ( player , "teamWonBonus" , displayName , bonus , data . getPoint ( ) ) ; } membersCache . clear ( ) ; } private void sendMessage ( Player player , String key , Object ... args ) { } @ SuppressWarnings ( "deprecation" ) private static OfflinePlayer getOfflinePlayer ( String name ) { } }

Fix:
BPUserData data = BPUserData . getDataFromName ( name ) ;
Buggy code:
public class TypeConverter { public static TypeDeclaration buildTypeDeclaration ( IType type , CompilationUnitDeclaration compilationUnit , CompilationResult compilationResult ) throws JavaModelException { char [ ] packageName = type . getPackageFragment ( ) . getElementName ( ) . toCharArray ( ) ; if ( ( packageName != null ) && ( ( packageName . length ) > 0 ) ) { <START_BUG> compilationUnit . currentPackage = new ImportReference ( CharOperation . splitOn ( '.' , packageName ) , new long [ ] { 0 } , false ) ; <END_BUG> } TypeDeclaration typeDeclaration = TypeConverter . convert ( type , null , null , compilationResult ) ; IType alreadyComputedMember = type ; IType parent = type . getDeclaringType ( ) ; TypeDeclaration previousDeclaration = typeDeclaration ; while ( parent != null ) { TypeDeclaration declaration = TypeConverter . convert ( parent , alreadyComputedMember , ( ( MemberTypeDeclaration ) ( previousDeclaration ) ) , compilationResult ) ; alreadyComputedMember = parent ; previousDeclaration = declaration ; parent = parent . getDeclaringType ( ) ; } compilationUnit . types = new TypeDeclaration [ ] { previousDeclaration } ; return typeDeclaration ; } private static FieldDeclaration convert ( IField field , IType type ) throws JavaModelException { } private static AbstractMethodDeclaration convert ( IMethod method , IType type , CompilationResult compilationResult ) throws JavaModelException { } private static TypeDeclaration convert ( IType type , IType alreadyComputedMember , MemberTypeDeclaration alreadyComputedMemberDeclaration , CompilationResult compilationResult ) throws JavaModelException { } private static TypeReference createTypeReference ( char [ ] type , IType contextType ) { } }

Fix:
compilationUnit . currentPackage = new ImportReference ( CharOperation . splitOn ( '.' , packageName ) , new long [ ] { 0 } , false , CompilerModifiers . AccDefault ) ;
Buggy code:
public abstract class PartSite implements IWorkbenchPartSite { private IWorkbenchPartReference partReference ; private IWorkbenchPart part ; private IPartActionBars partActionBars = null ; private IWorkbenchPage page ; private String extensionID ; private String pluginID ; private String extensionName ; private ISelectionProvider selectionProvider ; private SubActionBars actionBars ; private KeyBindingService keyBindingService ; private ArrayList menuExtenders ; private WorkbenchSiteProgressService progressService ; private SiteServices serviceContainer ; private IAdaptable hardcodedServices = new IAdaptable ( ) { public Object getAdapter ( Class adapter ) { } } ; public PartSite ( IWorkbenchPartReference ref , IWorkbenchPart part , IWorkbenchPage page ) { } public void dispose ( ) { } public IActionBars getActionBars ( ) { } public String getId ( ) { } public IWorkbenchPage getPage ( ) { } public PartPane getPane ( ) { } public IWorkbenchPart getPart ( ) { } public IWorkbenchPartReference getPartReference ( ) { } public String getPluginId ( ) { } public String getRegisteredName ( ) { } public ISelectionProvider getSelectionProvider ( ) { } public Shell getShell ( ) { } public IWorkbenchWindow getWorkbenchWindow ( ) { } public void registerContextMenu ( String menuID , MenuManager menuMgr , ISelectionProvider selProvider ) { } public void registerContextMenu ( MenuManager menuMgr , ISelectionProvider selProvider ) { } public String [ ] getContextMenuIds ( ) { } public void setActionBars ( SubActionBars bars ) { } public void setConfigurationElement ( IConfigurationElement configElement ) { extensionID = configElement . getAttribute ( "id" ) ; <START_BUG> pluginID = configElement . getDeclaringExtension ( ) . getNamespace ( ) ; <END_BUG> String name = configElement . getAttribute ( "name" ) ; if ( name != null ) extensionName = name ; } protected void setPluginId ( String pluginId ) { } protected void setId ( String id ) { } public void setPart ( IWorkbenchPart newPart ) { } protected void setRegisteredName ( String name ) { } public void setSelectionProvider ( ISelectionProvider provider ) { } public IKeyBindingService getKeyBindingService ( ) { } protected String getInitialScopeId ( ) { } public final Object getAdapter ( Class adapter ) { } private SiteServices getServiceContainer ( ) { } protected Object protectedGetAdapter ( Class adapter ) { } protected abstract IPartActionBars createPartActionBars ( ) { } public void activateActionBars ( boolean forceVisibility ) { } public void deactivateActionBars ( boolean forceHide ) { } private WorkbenchSiteProgressService getSiteProgressService ( ) { } }

Fix:
pluginID = configElement . getNamespace ( ) ;