nus-yam/ex-repair huggingface dataset:
Buggy code:
class PropertyInclusionsConfig extends EntityInclusionsConfig < OBPropertyGroup , OBProperties > { PropertyInclusionsConfig ( KConfigNode configNode ) { } String getInclusionId ( ) { } OBPropertyGroup createGroup ( KConfigNode groupNode , IRI rootIRI ) { } private boolean getFrameSources ( KConfigNode groupNode ) { } private CCardinality getSlotCardinality ( KConfigNode groupNode ) { } private CEditability getSlotEditability ( KConfigNode groupNode ) { } private OBSlotSources getSlotSources ( KConfigNode groupNode ) { } private OBFrameSlotsPolicy getFrameSlotsPolicy ( KConfigNode groupNode ) { <START_BUG> return groupNode . getEnum ( FRAME_SLOTS_POLICY_ATTR , OBFrameSlotsPolicy . class , DEFAULT_FRAME_SLOTS_POLICY ) ; <END_BUG> } }

Fix:
return groupNode . getEnum ( FRAME_SLOTS_POLICY_ATTR , OBFrameSlotsPolicy . class , UNSPECIFIED ) ;
Buggy code:
public class InterruptResilienceTest extends BaseJDBCTestCase { public InterruptResilienceTest ( String name ) { } private static volatile TestConfiguration thisConf ; protected static Test makeSuite ( String name ) { } public static Test suite ( ) { String testName = "InterruptResilienceTest" ; <START_BUG> if ( ! ( isSunJVM ( ) ) ) { <END_BUG> if ( getSystemProperty ( "java.version" ) . startsWith ( "1.5.0" ) ) { println ( "Test<seq2seq4repair_space>skipped<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>VM,<seq2seq4repair_space>cf.<seq2seq4repair_space>DERBY-4463" ) ; return new TestSuite ( testName ) ; } } if ( ! ( JDBC . vmSupportsJDBC3 ( ) ) ) { println ( ( "Test<seq2seq4repair_space>skipped<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>VM,<seq2seq4repair_space>" + "DriverManager<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>with<seq2seq4repair_space>JSR169" ) ) ; return new TestSuite ( testName ) ; } if ( hasInterruptibleIO ( ) ) { println ( "Test<seq2seq4repair_space>skipped<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>interruptible<seq2seq4repair_space>IO." ) ; println ( ( "This<seq2seq4repair_space>is<seq2seq4repair_space>default<seq2seq4repair_space>on<seq2seq4repair_space>Solaris//Sun<seq2seq4repair_space>Java<seq2seq4repair_space><=<seq2seq4repair_space>1.6,<seq2seq4repair_space>use<seq2seq4repair_space>" + "-XX:-UseVMInterruptibleIO<seq2seq4repair_space>if<seq2seq4repair_space>available." ) ) ; return new TestSuite ( testName ) ; } return InterruptResilienceTest . makeSuite ( testName ) ; } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public static void tstRAFwriteInterrupted ( ) throws SQLException { } public void testRAFWriteInterrupted ( ) throws SQLException { } public static void tstRAFReadWriteMultipleThreads ( ) throws Exception { } static class InterruptorThread extends Thread { private InterruptResilienceTest . WorkerThread myVictim ; private int millisBetweenShots ; public InterruptorThread ( InterruptResilienceTest . WorkerThread v , int m ) { } public void run ( ) { } } static class WorkerThread extends Thread { private final boolean readertest ; private final long noOps ; public Exception e ; private Connection c ; public WorkerThread ( Connection c , boolean readertest , long noOps ) { } public void run ( ) { } } static int NO_OF_THREADS = 3 ; static long NO_OF_MT_OPS = 10000 ; private static int threadNo ; static synchronized int getThreadNo ( ) { } private static long randAbs ( long l ) { } static volatile boolean allDone ; public void testRAFReadWriteMultipleThreads ( ) throws SQLException { } public static void tstInterruptLongQuery ( ) throws Exception { } public void testLongQueryInterrupt ( ) throws SQLException { } public static void tstInterruptBatch ( ) throws Exception { } public void testInterruptBatch ( ) throws SQLException { } }

Fix:
if ( isIBMJVM ( ) ) {
Buggy code:
public class InsertionRecoveryStrategy < T extends ITypePredicate > implements IRecoveryStrategy { private class CandidateToken { public final T tokenType ; public final String tokenText ; private CandidateToken ( T tokenType , String tokenText ) { } } private List < InsertionRecoveryStrategy < T > . CandidateToken > candidateTokens = new ArrayList < InsertionRecoveryStrategy < T > . CandidateToken > ( ) ; private Set < Short > lastTypes = new HashSet < Short > ( ) ; private Set < Short > currentTypes = new HashSet < Short > ( ) ; public InsertionRecoveryStrategy ( T type , String text , T ... lastTokenTypes ) { } public InsertionRecoveryStrategy ( T type1 , String text1 , T type2 , String text2 , T ... lastTokenTypes ) { } public void addCurrentTokenTypes ( T ... tokenTypes ) { } public void addLastTokenTypes ( T ... tokenTypes ) { } public void addToken ( T tokenType , String text ) { } public boolean recover ( IParser parser , Symbol lastToken , Symbol currentToken , TokenStream in ) throws IOException { boolean result = false ; if ( ( ( ( candidateTokens . size ( ) ) > 0 ) && ( ( ( lastTypes . size ( ) ) == 0 ) || ( lastTypes . contains ( lastToken . getId ( ) ) ) ) ) && ( ( ( currentTypes . size ( ) ) == 0 ) || ( currentTypes . contains ( currentToken . getId ( ) ) ) ) ) { in . alloc ( ( ( candidateTokens . size ( ) ) + 1 ) ) ; in . insert ( currentToken ) ; List < Symbol > terminals = new ArrayList < Symbol > ( candidateTokens . size ( ) ) ; <START_BUG> int tokenStart = currentToken . getStart ( ) ; <END_BUG> int tokenEnd = tokenStart - 1 ; for ( InsertionRecoveryStrategy < T > . CandidateToken candidateToken : candidateTokens ) { short id = candidateToken . tokenType . getIndex ( ) ; String text = candidateToken . tokenText ; Symbol term = new Symbol ( id , tokenStart , tokenEnd , text ) ; terminals . add ( term ) ; } Collections . reverse ( terminals ) ; if ( parser instanceof Parser ) { Simulator sim = ( ( Parser ) ( parser ) ) . new Simulator ( ) ; for ( Symbol terminal : terminals ) { in . insert ( terminal ) ; } if ( sim . parse ( in ) ) { result = true ; in . rewind ( ) ; } } } return result ; } }

Fix:
int tokenStart = ( lastToken . getEnd ( ) ) + 1 ;
Buggy code:
public class POP3Store { public static final int STATE_NONAUTHENTICATE = 0 ; public static final int STATE_AUTHENTICATE = 1 ; private int state = POP3Store . STATE_NONAUTHENTICATE ; private POP3Protocol protocol ; private PopItem popItem ; private POP3PreProcessingFilterPluginHandler handler ; private Hashtable filterCache ; private StatusObservableImpl observable ; public POP3Store ( PopItem popItem ) { } public int getState ( ) { } public void setState ( int state ) { } public List fetchUIDList ( int totalMessageCount ) throws Exception { } public List fetchMessageSizeList ( ) throws Exception { } public int fetchMessageCount ( ) throws Exception { } public boolean deleteMessage ( int index ) throws Exception { } protected String modifyMessage ( String rawString ) { } public ColumbaMessage fetchMessage ( int index ) throws Exception { isLogin ( ) ; String rawString = protocol . fetchMessage ( new Integer ( index ) . toString ( ) ) ; if ( ( rawString . length ( ) ) == 0 ) return null ; if ( popItem . getBoolean ( "enable_pop3preprocessingfilter" , false ) ) rawString = modifyMessage ( rawString ) ; Source source = new CharSequenceSource ( rawString ) ; Header header = HeaderParser . parse ( source ) ; ColumbaMessage m = new ColumbaMessage ( header ) ; <START_BUG> ColumbaHeader h = ( ( ColumbaHeader ) ( m . getHeaderInterface ( ) ) ) ; <END_BUG> m . setStringSource ( rawString ) ; h . getAttributes ( ) . put ( "columba.host" , popItem . get ( "host" ) ) ; h . getAttributes ( ) . put ( "columba.fetchstate" , Boolean . TRUE ) ; return m ; } public void logout ( ) throws Exception { } public void close ( ) throws Exception { } public void login ( ) throws Exception { } public boolean isLogin ( ) throws Exception { } public StatusObservable getObservable ( ) { } }

Fix:
ColumbaHeader h = ( ( ColumbaHeader ) ( m . getHeader ( ) ) ) ;
Buggy code:
public class TestCacheModeNone extends AbstractCacheModeTestCase { private static OpenJPAEntityManagerFactorySPI emf = null ; private static Cache cache = null ; private static List < String > sql = new ArrayList < String > ( ) ; private static JDBCListener listener ; private static Class < ? > [ ] expectedInCache = new Class < ? > [ ] { } ; private static Class < ? > [ ] expectedNotInCache = persistentTypes ; @ Override public OpenJPAEntityManagerFactorySPI getEntityManagerFactory ( ) { if ( ( TestCacheModeNone . emf ) == null ) { <START_BUG> TestCacheModeNone . emf = createEntityManagerFactory ( "cache-mode-none" ) ; <END_BUG> assertNotNull ( TestCacheModeNone . emf ) ; TestCacheModeNone . cache = TestCacheModeNone . emf . getCache ( ) ; assertNotNull ( TestCacheModeNone . cache ) ; } return TestCacheModeNone . emf ; } public JDBCListener getListener ( ) { } public List < String > getSql ( ) { } @ Override public boolean getCacheEnabled ( ) { } public void testCacheables ( ) { } public void testUncacheables ( ) { } public void testUnspecified ( ) { } @ Override protected Class < ? > [ ] getExpectedInCache ( ) { } @ Override protected Class < ? > [ ] getExpectedNotInCache ( ) { } }

Fix:
TestCacheModeNone . emf = createEntityManagerFactory ( "cache-mode-none" , null ) ;
Buggy code:
public abstract class EditorDemoBuilder extends DemoBuilder { protected GameAssets gameAssets ; protected boolean built = false ; protected String [ ] assets ; protected FileHandle rootFolder ; protected String root ; protected DesktopPlatform platform ; protected boolean convertPNGs = false ; public EditorDemoBuilder ( String root ) { } protected Array < Polygon > createSchemaCollider ( String imageUri ) { } protected Dimension getImageDimension ( String imageUri ) { } public void run ( ) { } public HashMap < String , ModelEntity > build ( ) { } public void save ( ) { for ( Map . Entry < String , ModelEntity > entry : entities . entrySet ( ) ) { FileHandle fh = rootFolder . child ( entry . getKey ( ) ) ; if ( fh . isDirectory ( ) ) { fh . mkdirs ( ) ; } else if ( ! ( fh . parent ( ) . exists ( ) ) ) { fh . parent ( ) . mkdirs ( ) ; } app . debug ( LOG_TAG , ( "Saving<seq2seq4repair_space>to:<seq2seq4repair_space>" + ( fh . file ( ) . getAbsolutePath ( ) ) ) ) ; <START_BUG> new Json ( ) . toJson ( entry . getValue ( ) , null , fh ) ; <END_BUG> } } protected void createOutputFolder ( ) { } public InputStream getSnapshotInputStream ( ) { } public FileHandle getRootFolder ( ) { } public void clean ( ) { } protected String [ ] assetPaths ( ) { } public String getDescription ( ) { } protected String getSnapshotUri ( ) { } public String getName ( ) { } public EditorDemoBuilder singleSceneGame ( String backgroundUri ) { } public EditorDemoBuilder entity ( ModelEntity parent , String imageUri , VerticalAlign verticalAlign , HorizontalAlign horizontalAlign ) { } @ Override protected Image createImage ( String uri ) { } }

Fix:
gameAssets . toJson ( entry . getValue ( ) , null , fh ) ;
Buggy code:
public class ReconcileWorkingCopyOperation extends JavaModelOperation { public static boolean PERF = false ; public int astLevel ; public boolean resolveBindings ; public HashMap problems ; boolean forceProblemDetection ; WorkingCopyOwner workingCopyOwner ; public CompilationUnit ast ; public JavaElementDeltaBuilder deltaBuilder ; public ReconcileWorkingCopyOperation ( IJavaElement workingCopy , int astLevel , boolean forceProblemDetection , WorkingCopyOwner workingCopyOwner ) { } protected void executeOperation ( ) throws JavaModelException { if ( ( this . progressMonitor ) != null ) { if ( this . progressMonitor . isCanceled ( ) ) throw new OperationCanceledException ( ) ; this . progressMonitor . beginTask ( Messages . element_reconciling , 2 ) ; } CompilationUnit workingCopy = getWorkingCopy ( ) ; IProblemRequestor problemRequestor = workingCopy . getPerWorkingCopyInfo ( ) ; this . resolveBindings |= ( problemRequestor != null ) && ( problemRequestor . isActive ( ) ) ; this . deltaBuilder = new JavaElementDeltaBuilder ( workingCopy ) ; makeConsistent ( workingCopy , problemRequestor ) ; notifyParticipants ( workingCopy ) ; if ( ( ( this . ast ) == null ) && ( ( ( this . astLevel ) > ( ICompilationUnit . NO_AST ) ) || ( this . resolveBindings ) ) ) makeConsistent ( workingCopy , problemRequestor ) ; if ( ( this . problems ) != null ) { try { problemRequestor . beginReporting ( ) ; <START_BUG> for ( Iterator iteraror = problems . values ( ) . iterator ( ) ; iteraror . hasNext ( ) ; ) { <END_BUG> CategorizedProblem [ ] categorizedProblems = ( ( CategorizedProblem [ ] ) ( iteraror . next ( ) ) ) ; if ( categorizedProblems == null ) continue ; for ( int i = 0 , length = categorizedProblems . length ; i < length ; i ++ ) { CategorizedProblem problem = categorizedProblems [ i ] ; if ( JavaModelManager . VERBOSE ) { System . out . println ( ( "PROBLEM<seq2seq4repair_space>FOUND<seq2seq4repair_space>while<seq2seq4repair_space>reconciling<seq2seq4repair_space>:<seq2seq4repair_space>" + ( problem . getMessage ( ) ) ) ) ; } if ( ( ( this . progressMonitor ) != null ) && ( this . progressMonitor . isCanceled ( ) ) ) break ; problemRequestor . acceptProblem ( problem ) ; } } } finally { problemRequestor . endReporting ( ) ; } } try { JavaElementDelta delta = this . deltaBuilder . delta ; if ( delta != null ) { addReconcileDelta ( workingCopy , delta ) ; } } finally { if ( ( this . progressMonitor ) != null ) this . progressMonitor . done ( ) ; } } protected CompilationUnit getWorkingCopy ( ) { } public boolean isReadOnly ( ) { } public CompilationUnit makeConsistent ( CompilationUnit workingCopy , IProblemRequestor problemRequestor ) throws JavaModelException { } private void notifyParticipants ( final CompilationUnit workingCopy ) { } protected IJavaModelStatus verify ( ) { } }

Fix:
for ( Iterator iteraror = this . problems . values ( ) . iterator ( ) ; iteraror . hasNext ( ) ; ) {
Buggy code:
public final class RecommenderJob { private RecommenderJob ( ) { } public static void main ( String [ ] args ) throws IOException { } public static JobConf buildJobConf ( String recommendClassName , int recommendationsPerUser , String userIDFile , String dataModelFile , String outputPath ) throws IOException { Path userIDFilePath = new Path ( userIDFile ) ; Path outputPathPath = new Path ( outputPath ) ; JobConf jobConf = new JobConf ( RecommenderJob . class ) ; <START_BUG> FileSystem fs = FileSystem . get ( jobConf ) ; <END_BUG> if ( fs . exists ( outputPathPath ) ) { fs . delete ( outputPathPath , true ) ; } jobConf . set ( RECOMMENDER_CLASS_NAME , recommendClassName ) ; jobConf . set ( RECOMMENDATIONS_PER_USER , String . valueOf ( recommendationsPerUser ) ) ; jobConf . set ( DATA_MODEL_FILE , dataModelFile ) ; jobConf . setInputFormat ( TextInputFormat . class ) ; FileInputFormat . setInputPaths ( jobConf , userIDFilePath ) ; jobConf . setMapperClass ( RecommenderMapper . class ) ; jobConf . setMapOutputKeyClass ( Text . class ) ; jobConf . setMapOutputValueClass ( RecommendedItemsWritable . class ) ; jobConf . setReducerClass ( IdentityReducer . class ) ; jobConf . setOutputKeyClass ( Text . class ) ; jobConf . setOutputValueClass ( RecommendedItemsWritable . class ) ; jobConf . setOutputFormat ( TextOutputFormat . class ) ; FileOutputFormat . setOutputPath ( jobConf , outputPathPath ) ; return jobConf ; } }

Fix:
FileSystem fs = FileSystem . get ( outputPathPath . toUri ( ) , jobConf ) ;
Buggy code:
public class EJBSecurityManagerDefaultImpl implements EJBSecurityManager { public boolean isValid ( Principal principal , Object credential ) { <START_BUG> return principal . getName ( ) . equals ( credential . toString ( ) ) ; <END_BUG> } }

Fix:
return ( credential != null ) && ( principal . getName ( ) . equals ( credential . toString ( ) ) ) ;
Buggy code:
public class DeadCode implements cfg . Visitor { private HashMap < Cfg . Stm . T , HashSet < String > > livenessOut ; private T mainMethod ; private T method ; private T block ; public T program ; public DeadCode ( ) { } public void setLivenessOut ( HashMap < T , HashSet < String > > livenessOut ) { } @ Override public void visit ( BlockSingle b ) { LinkedList < Cfg . Stm . T > stms = new LinkedList < > ( ) ; <START_BUG> stms . addAll ( b . stms . stream ( ) . filter ( ( stm ) -> ( stm instanceof Print ) || ( this . livenessOut . get ( stm ) . contains ( stm . dst ) ) ) . collect ( Collectors . toList ( ) ) ) ; <END_BUG> this . block = new BlockSingle ( b . label , stms , b . transfer ) ; } @ Override public void visit ( MethodSingle m ) { } @ Override public void visit ( MainMethodSingle m ) { } @ Override public void visit ( ProgramSingle p ) { } }

Fix:
stms . addAll ( b . stms . stream ( ) . filter ( ( stm ) -> ( ( stm instanceof Print ) || ( stm instanceof Cfg . Stm . InvokeVirtual ) ) || ( this . livenessOut . get ( stm ) . contains ( stm . dst ) ) ) . collect ( Collectors . toList ( ) ) ) ;
Buggy code:
public class EncodingInfo { String ianaName ; String javaName ; int lastPrintable ; CharToByteConverter fCToB = null ; boolean fHaveTriedCToB = false ; public EncodingInfo ( String ianaName , String javaName , int lastPrintable ) { } public String getIANAName ( ) { } public Writer getWriter ( OutputStream output ) throws UnsupportedEncodingException { } public boolean isPrintable ( char ch ) { } public static void testJavaEncodingName ( String name ) throws UnsupportedEncodingException { <START_BUG> final byte [ ] bTest = new byte [ ] { 'v' , 'a' , 'l' , 'i' , 'd' } ; <END_BUG> String s = new String ( bTest , name ) ; } }

Fix:
final byte [ ] bTest = new byte [ ] { ( ( byte ) ( 'v' ) ) , ( ( byte ) ( 'a' ) ) , ( ( byte ) ( 'l' ) ) , ( ( byte ) ( 'i' ) ) , ( ( byte ) ( 'd' ) ) } ;
Buggy code:
public class CapturePictureHandler implements PictureCallback { private static final String TAG = CapturePictureHandler . class . getSimpleName ( ) ; private final Context context ; private File photoFile ; private static final String DIRECTORY = "//Data4all" ; private static final String FILE_FORMAT = ".jpeg" ; private static final String FILEPATH = "file_path" ; private static final String DEVICE_ORIENTATION = "current_orientation" ; private DeviceOrientation currentOrientation ; private static final String SCREEN_ORIENTATION = "SCREEN_ORIENTATION" ; private static final String TRANSFORM_BEAN = "transform_bean" ; private TransformationParamBean transformBean ; public CapturePictureHandler ( Context context ) { } @ Override public void onPictureTaken ( byte [ ] raw , Camera camera ) { <START_BUG> Log . d ( CapturePictureHandler . TAG , "onPictureTaken<seq2seq4repair_space>isSave<seq2seq4repair_space>the<seq2seq4repair_space>Picture" ) ; <END_BUG> final Camera . Parameters params = camera . getParameters ( ) ; final double horizontalViewAngle = Math . toRadians ( params . getHorizontalViewAngle ( ) ) ; final double verticalViewAngle = Math . toRadians ( params . getVerticalViewAngle ( ) ) ; final Size pictureSize = params . getPictureSize ( ) ; final Location currentLocation = Optimizer . currentBestLoc ( ) ; transformBean = new TransformationParamBean ( this . getDeviceHeight ( ) , horizontalViewAngle , verticalViewAngle , pictureSize . width , pictureSize . height , currentLocation ) ; currentOrientation = Optimizer . currentDeviceOrientation ( ) ; new CapturePictureHandler . SavePhotoTask ( params ) . execute ( raw ) ; } private double getDeviceHeight ( ) { } class SavePhotoTask extends AsyncTask < byte [ ] , String , String > { private Parameters params ; public SavePhotoTask ( Camera . Parameters params ) { } @ Override protected String doInBackground ( byte [ ] ... photoData ) { } @ Override protected void onPostExecute ( String result ) { } } public int getOrientationForRotation ( ) { } private File createFile ( ) { } }

Fix:
Log . d ( CapturePictureHandler . TAG , "onPictureTaken<seq2seq4repair_space>is<seq2seq4repair_space>called" ) ;
Buggy code:
public class AndroidSDKManager { private String toolsDir ; private String platformTools ; private static class DeviceListParser implements IStreamListener { private StringBuffer buffer = new StringBuffer ( ) ; @ Override public void streamAppended ( String text , IStreamMonitor monitor ) { } public List < AndroidDevice > getDeviceList ( ) { } } private static class AVDListParser implements IStreamListener { private static final String PREFIX_NAME = "Name:" ; private static final String MARKER_LEVEL = "API<seq2seq4repair_space>level" ; private StringBuffer buffer = new StringBuffer ( ) ; @ Override public void streamAppended ( String text , IStreamMonitor monitor ) { } public List < AndroidAVD > getAVDList ( ) { } } private static class TargetListParser implements IStreamListener { private StringBuffer buffer = new StringBuffer ( ) ; @ Override public void streamAppended ( String text , IStreamMonitor monitor ) { } public List < AndroidSDK > getSDKList ( ) { } } private static class CreateProjectResultParser implements IStreamListener { private StringBuffer buffer = new StringBuffer ( ) ; @ Override public void streamAppended ( String text , IStreamMonitor monitor ) { } public String getErrorString ( ) { } } private AndroidSDKManager ( String tools , String platform ) { } public static AndroidSDKManager getManager ( ) throws CoreException { } public void createProject ( AndroidSDK target , String projectName , File path , String activity , String packageName , IProgressMonitor monitor ) throws CoreException { } public void updateProject ( AndroidSDK sdk , String projectName , boolean isLibrary , File path , IProgressMonitor monitor ) throws CoreException { } public void startADBServer ( ) throws CoreException { } public void killADBServer ( ) throws CoreException { } public List < AndroidAVD > listAVDs ( ) throws CoreException { } public List < AndroidSDK > listTargets ( ) throws CoreException { } public List < AndroidDevice > listDevices ( ) throws CoreException { } public void installApk ( File apkFile , String serialNumber , IProgressMonitor monitor ) throws CoreException { } public void waitForEmulator ( ) throws CoreException { } public void startApp ( String component , String serialNumber , IProgressMonitor monitor ) throws CoreException { } public void logcat ( String filter , IStreamListener outListener , IStreamListener errorListener , String serialNumber ) throws CoreException { } public void startEmulator ( String avd ) throws CoreException { } public void startAVDManager ( ) throws CoreException { } private String getAndroidCommand ( ) { String command = "android" ; <START_BUG> return isWindows ( ) ? "cmd<seq2seq4repair_space>//c<seq2seq4repair_space>" + command : command ; <END_BUG> } private String getADBCommand ( ) { } private String getEmulatorCommand ( ) { } private boolean isWindows ( ) { } private String addQuotes ( String path ) { } }

Fix:
return isWindows ( ) ? "cmd<seq2seq4repair_space>//c<seq2seq4repair_space>" + command : ".//" + command ;
Buggy code:
@ Component ( immediate = true ) public class PathIntentCompiler implements IntentCompiler < PathIntent > { @ Reference ( cardinality = ReferenceCardinality . MANDATORY_UNARY ) protected CoreService coreService ; @ Reference ( cardinality = ReferenceCardinality . MANDATORY_UNARY ) protected IntentExtensionService intentManager ; private ApplicationId appId ; @ Activate public void activate ( ) { } @ Deactivate public void deactivate ( ) { } @ Override public List < Intent > compile ( PathIntent intent , List < Intent > installable , Set < LinkResourceAllocations > resources ) { List < Link > links = intent . path ( ) . links ( ) ; List < FlowRule > rules = new java . util . ArrayList ( ( ( links . size ( ) ) - 1 ) ) ; for ( int i = 0 ; i < ( ( links . size ( ) ) - 1 ) ; i ++ ) { ConnectPoint ingress = links . get ( i ) . dst ( ) ; ConnectPoint egress = links . get ( ( i + 1 ) ) . src ( ) ; FlowRule rule = createFlowRule ( intent . selector ( ) , intent . treatment ( ) , ingress , egress , isLast ( links , i ) ) ; rules . add ( rule ) ; } <START_BUG> return Arrays . asList ( new org . onosproject . net . intent . FlowRuleIntent ( appId , rules ) ) ; <END_BUG> } private FlowRule createFlowRule ( TrafficSelector originalSelector , TrafficTreatment originalTreatment , ConnectPoint ingress , ConnectPoint egress , boolean last ) { } private boolean isLast ( List < Link > links , int i ) { } }

Fix:
return Arrays . asList ( new org . onosproject . net . intent . FlowRuleIntent ( appId , null , rules , intent . resources ( ) ) ) ;
Buggy code:
public abstract class ParentRunner < T > extends Runner implements Filterable , Sortable { private final TestClass fTestClass ; private Filter fFilter = Filter . ALL ; private Sorter fSorter = Sorter . NULL ; private List < T > fFilteredChildren = null ; private RunnerScheduler fScheduler = new RunnerScheduler ( ) { public void schedule ( Runnable childStatement ) { } public void finished ( ) { } } ; protected ParentRunner ( Class < ? > testClass ) throws InitializationError { } protected abstract List < T > getChildren ( ) { } protected abstract Description describeChild ( T child ) { } protected abstract void runChild ( T child , RunNotifier notifier ) { } protected void collectInitializationErrors ( List < Throwable > errors ) { } protected void validatePublicVoidNoArgMethods ( Class < ? extends Annotation > annotation , boolean isStatic , List < Throwable > errors ) { } protected Statement classBlock ( final RunNotifier notifier ) { } protected Statement withBeforeClasses ( Statement statement ) { } protected Statement withAfterClasses ( Statement statement ) { } private Statement withClassRules ( Statement statement ) { } protected List < TestRule > classRules ( ) { } private TestRule getClassRule ( final FrameworkField field ) { } protected List < FrameworkField > classRuleFields ( ) { } protected Statement childrenInvoker ( final RunNotifier notifier ) { } private void runChildren ( final RunNotifier notifier ) { } protected String getName ( ) { } public final TestClass getTestClass ( ) { } protected final void runLeaf ( Statement statement , Description description , RunNotifier notifier ) { } @ Override public Description getDescription ( ) { } @ Override public void run ( final RunNotifier notifier ) { } public void filter ( Filter filter ) throws NoTestsRemainException { } public void sort ( Sorter sorter ) { } private void validate ( ) throws InitializationError { } private List < T > getFilteredChildren ( ) { if ( ( fFilteredChildren ) == null ) <START_BUG> fFilteredChildren = getChildren ( ) ; <END_BUG> return fFilteredChildren ; } private void sortChild ( T child ) { } private void filterChild ( T child ) throws NoTestsRemainException { } private boolean shouldRun ( T each ) { } private Comparator < ? super T > comparator ( ) { } public void setScheduler ( RunnerScheduler scheduler ) { } }

Fix:
fFilteredChildren = new ArrayList < T > ( getChildren ( ) ) ;
Buggy code:
public class WebExternalResourceStream extends AbstractResourceStream { InputStream in ; private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( WebExternalResourceStream . class ) ; private final String url ; public WebExternalResourceStream ( String url ) { } @ Override public long length ( ) { } public void close ( ) throws IOException { } @ Override public Time lastModifiedTime ( ) { } @ Override public String getContentType ( ) { <START_BUG> return null ; <END_BUG> } public InputStream getInputStream ( ) throws ResourceStreamNotFoundException { } }

Fix:
return WebApplication . get ( ) . getServletContext ( ) . getMimeType ( url ) ;
Buggy code:
public class BooleanDatatypeValidator extends AbstractDatatypeValidator { private static final String [ ] fValueSpace = new String [ ] { "false" , "true" , "0" , "1" } ; public BooleanDatatypeValidator ( ) { } public BooleanDatatypeValidator ( DatatypeValidator base , Hashtable facets , boolean derivedByList , XMLErrorReporter reporter ) { } <START_BUG> public Object validate ( String content , Object state ) throws InvalidDatatypeValueException { <END_BUG> checkContent ( content , false ) ; return null ; } public int compare ( String content1 , String content2 ) { } public Hashtable getFacets ( ) { } public Object clone ( ) throws CloneNotSupportedException { } private void checkContent ( String content , boolean asBase ) throws InvalidDatatypeValueException { } }

Fix:
public Object validate ( String content , ValidationContext state ) throws InvalidDatatypeValueException {
Buggy code:
public class FastDateFormatTest { @ Test public void test_getInstance ( ) { } @ Test public void test_getInstance_String ( ) { } @ Test public void test_getInstance_String_TimeZone ( ) { } @ Test public void test_getInstance_String_Locale ( ) { } @ Test public void test_changeDefault_Locale_DateInstance ( ) { } @ Test public void test_changeDefault_Locale_DateTimeInstance ( ) { } @ Test public void test_getInstance_String_TimeZone_Locale ( ) { } @ Test public void testCheckDefaults ( ) { } @ Test public void testCheckDifferingStyles ( ) { } @ Test public void testDateDefaults ( ) { } @ Test public void testTimeDefaults ( ) { } @ Test public void testTimeDateDefaults ( ) { } @ Test public void testLang954 ( ) throws Exception { <START_BUG> String pattern = "yyyy-MM-dd'T'" ; <END_BUG> FastDateFormat . getInstance ( pattern ) ; } @ Test public void testParseSync ( ) throws InterruptedException { } private static final int NTHREADS = 10 ; private static final int NROUNDS = 10000 ; private long measureTime ( final Format formatter , final Format parser ) throws InterruptedException { } }

Fix:
final String pattern = "yyyy-MM-dd'T'" ;
Buggy code:
@ Service public class ProductQuantitiesService { public Map < Entity , BigDecimal > getProductComponentQuantities ( final List < Entity > orders ) { } public Map < Entity , BigDecimal > getProductQuantities ( final Entity technology , final BigDecimal givenQty ) { } public Map < Entity , BigDecimal > getProductQuantities ( final EntityList orders , final boolean onlyComponents ) { } private void fillMapWithQuantitiesForTechnology ( final Entity technology , final BigDecimal givenQty , final Map < Entity , BigDecimal > productComponentQuantities ) { } private void preloadProductQuantities ( final EntityTree tree , final Map < Entity , BigDecimal > productQuantities ) { } private void calculateQuantitiesForNormalAlgorithm ( final EntityTree tree , final Map < Entity , BigDecimal > productQuantities , final BigDecimal plannedQty , final Entity technology ) { } <START_BUG> private void traverse ( final Entity operationComponent , final Entity previousOperationComponent , Map < Entity , BigDecimal > productQuantities , final BigDecimal plannedQty , final Entity technology ) { <END_BUG> if ( previousOperationComponent == null ) { Entity outProduct = technology . getBelongsToField ( "product" ) ; for ( Entity out : operationComponent . getHasManyField ( "operationProductOutComponents" ) ) { if ( out . getBelongsToField ( "product" ) . getId ( ) . equals ( outProduct . getId ( ) ) ) { BigDecimal outQuantity = productQuantities . get ( out ) ; BigDecimal multiplier = plannedQty . divide ( outQuantity ) ; productQuantities . put ( out , outQuantity . multiply ( multiplier ) ) ; for ( Entity currentIn : operationComponent . getHasManyField ( "operationProductInComponents" ) ) { BigDecimal currentInQuantity = productQuantities . get ( currentIn ) ; productQuantities . put ( currentIn , currentInQuantity . multiply ( multiplier ) ) ; } break ; } } } else { for ( Entity out : operationComponent . getHasManyField ( "operationProductOutComponents" ) ) { for ( Entity in : previousOperationComponent . getHasManyField ( "operationProductInComponents" ) ) { if ( out . getBelongsToField ( "product" ) . getId ( ) . equals ( in . getBelongsToField ( "product" ) . getId ( ) ) ) { BigDecimal outQuantity = productQuantities . get ( out ) ; BigDecimal inQuantity = productQuantities . get ( in ) ; BigDecimal multiplier = inQuantity . divide ( outQuantity ) ; productQuantities . put ( out , outQuantity . multiply ( multiplier ) ) ; for ( Entity currentIn : operationComponent . getHasManyField ( "operationProductInComponents" ) ) { BigDecimal currentInQuantity = productQuantities . get ( currentIn ) ; productQuantities . put ( currentIn , currentInQuantity . multiply ( multiplier ) ) ; } break ; } } } } for ( Entity child : operationComponent . getHasManyField ( "children" ) ) { traverse ( child , operationComponent , productQuantities , plannedQty , technology ) ; } } }

Fix:
private void traverse ( final Entity operationComponent , final Entity previousOperationComponent , final Map < Entity , BigDecimal > productQuantities , final BigDecimal plannedQty , final Entity technology ) {
Buggy code:
@ WebService ( endpointInterface = "edu.fudan.se.crowdservice.siteinspection.InspectSiteService" ) public class InspectSiteServiceImpl implements InspectSiteService { @ Override public String siteInspect ( double latitude , double longitude , String consumerId , int cost , int deadline , String compositeService , int resultNum , String brand , String series , String newness , String CPU , String memory , String hardDisk , String location ) { String xmlDoc = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<Root><Description>Please<seq2seq4repair_space>get<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>designated<seq2seq4repair_space>location<seq2seq4repair_space>and<seq2seq4repair_space>inspect<seq2seq4repair_space>the<seq2seq4repair_space>second-hand<seq2seq4repair_space>computer<seq2seq4repair_space>specified<seq2seq4repair_space>" + ( ( "below.<seq2seq4repair_space>Check<seq2seq4repair_space>it<seq2seq4repair_space>and<seq2seq4repair_space>evaluate<seq2seq4repair_space>whether<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>consistent<seq2seq4repair_space>with<seq2seq4repair_space>its<seq2seq4repair_space>description<seq2seq4repair_space>given<seq2seq4repair_space>below.<seq2seq4repair_space>Take<seq2seq4repair_space>a<seq2seq4repair_space>picture<seq2seq4repair_space>" + "of<seq2seq4repair_space>computer<seq2seq4repair_space>and<seq2seq4repair_space>upload<seq2seq4repair_space>the<seq2seq4repair_space>picture.<//Description>" ) + "<TextDisplay><Key>Brand<//Key><Value>" ) ) + brand ) + "<//Value><//TextDisplay><TextDisplay><Key>Series<//Key><Value>" ) + series ) + "<//Value><//TextDisplay><TextDisplay><Key>Newness<//Key><Value>" ) + newness ) + "<//Value><//TextDisplay><TextDisplay><Key>CPU<//Key><Value>" ) + CPU ) + "<//Value><//TextDisplay><TextDisplay><Key>Memory<//Key><Value>" ) + memory ) + "<//Value><//TextDisplay><TextDisplay><Key>Hard<seq2seq4repair_space>Disk<//Key><Value>" ) + hardDisk ) + "<//Value><//TextDisplay><TextDisplay><Key>Seller<seq2seq4repair_space>Address<//Key><Value>" ) + location ) + "<//Value><//TextDisplay><ImageInput><Key>Photo<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>Second-hand<seq2seq4repair_space>Computer<//Key>" ) + "<Value><//Value><//ImageInput><ChoiceInput>" ) + "<Key>Please<seq2seq4repair_space>Choose<seq2seq4repair_space>Consistent<seq2seq4repair_space>Degree<//Key>" ) + "<Value>Very<seq2seq4repair_space>Consistent,Consistent,Not<seq2seq4repair_space>Consistent<//Value>" ) + "<//ChoiceInput><//Root>" ; <START_BUG> String crowdService = InspectSiteService . class . getName ( ) ; <END_BUG> long taskId = new InsertMicrotaskOperator ( xmlDoc , consumerId , cost , deadline , compositeService , crowdService , resultNum , latitude , longitude ) . getResult ( ) ; String result = new SelectedLatestResponseAggregator ( ) . aggregate ( taskId , deadline ) ; System . out . println ( result ) ; return result ; } }

Fix:
String crowdService = "service.shcomputer.cs.siteinspection.interfaces.SiteInspectionService" ;
Buggy code:
public class MacInstalledJavaSource implements IVersionSource { @ Override public void enumerateVersions ( JavaVersionRepository repository ) { } protected String getMacJava ( String versionNumber ) { String path = Utils . getProcessOutput ( "//usr//libexec//java_home" , ( "-v<seq2seq4repair_space>" + versionNumber ) ) ; <START_BUG> return ( ( ( path + ( File . pathSeparator ) ) + "bin" ) + ( File . pathSeparator ) ) + "java" ; <END_BUG> } }

Fix:
return ( ( ( path + ( File . separator ) ) + "bin" ) + ( File . separator ) ) + "java" ;
Buggy code:
@ Slow public class TestRandomFaceting extends SolrTestCaseJ4 { public static final String FOO_STRING_FIELD = "foo_s1" ; public static final String SMALL_STRING_FIELD = "small_s1" ; public static final String SMALL_INT_FIELD = "small_i" ; @ BeforeClass public static void beforeTests ( ) throws Exception { } int indexSize ; List < FldType > types ; Map < Comparable , Doc > model = null ; boolean validateResponses = true ; void init ( ) { } void addMoreDocs ( int ndocs ) throws Exception { } void deleteSomeDocs ( ) { Random rand = random ( ) ; int percent = rand . nextInt ( 100 ) ; if ( ( model ) == null ) return ; ArrayList < String > ids = new ArrayList < String > ( model . size ( ) ) ; for ( Comparable id : model . keySet ( ) ) { if ( ( rand . nextInt ( 100 ) ) < percent ) { ids . add ( id . toString ( ) ) ; } } if ( ( ids . size ( ) ) == 0 ) return ; <START_BUG> StringBuffer sb = new StringBuffer ( "id:(" ) ; <END_BUG> for ( String id : ids ) { sb . append ( id ) . append ( '<seq2seq4repair_space>' ) ; model . remove ( id ) ; } sb . append ( ')' ) ; assertU ( delQ ( sb . toString ( ) ) ) ; if ( ( rand . nextInt ( 10 ) ) == 0 ) { assertU ( optimize ( ) ) ; } else { assertU ( commit ( "softCommit" , ( "" + ( ( rand . nextInt ( 10 ) ) != 0 ) ) ) ) ; } } @ Test public void testRandomFaceting ( ) throws Exception { } void doFacetTests ( ) throws Exception { } List < String > multiValuedMethods = Arrays . asList ( new String [ ] { "enum" , "fc" } ) ; List < String > singleValuedMethods = Arrays . asList ( new String [ ] { "enum" , "fc" , "fcs" } ) ; void doFacetTests ( FldType ftype ) throws Exception { } }

Fix:
StringBuilder sb = new StringBuilder ( "id:(" ) ;
Buggy code:
public class HeaderSectionMyLabel extends WebMarkupContainerWithAssociatedMarkup { private static final long serialVersionUID = 1L ; public HeaderSectionMyLabel ( final String id , final String label ) { } protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { <START_BUG> replaceComponentTagBody ( markupStream , openTag , getModelObjectAsString ( ) ) ; <END_BUG> } public void renderHead ( HtmlHeaderContainer container ) { } }

Fix:
replaceComponentTagBody ( markupStream , openTag , getDefaultModelObjectAsString ( ) ) ;
Buggy code:
public class MyComponent extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private int intParam ; private Integer integerParam ; private long long1Param ; private Long long2Param ; private float float1Param ; private Float float2Param ; private double double1Param ; private Double double2Param ; private String hexParam ; private String dateParam ; public MyComponent ( final String id ) { } public void setIntParam ( final int param ) { } public void setIntegerParam ( final Integer param ) { } public void setLong1Param ( final long param ) { } public void setLong2Param ( final Long param ) { } public void setFloat1Param ( final float param ) { } public void setFloat2Param ( final Float param ) { } public void setDouble1Param ( final double param ) { } public void setDouble2Param ( final Double param ) { } public void setDateParam ( final String param ) { } public void setHexParam ( final String param ) { } protected void onComponentTagBody ( MarkupStream markupStream , ComponentTag openTag ) { StringBuffer str = new StringBuffer ( ) ; str . append ( ( ( "intParam:<seq2seq4repair_space>" + ( intParam ) ) + "<br//>" ) ) ; str . append ( ( ( "integerParam:<seq2seq4repair_space>" + ( integerParam . toString ( ) ) ) + "<br//>" ) ) ; str . append ( ( ( "long1Param:<seq2seq4repair_space>" + ( long1Param ) ) + "<br//>" ) ) ; str . append ( ( ( "long2Param:<seq2seq4repair_space>" + ( long2Param . toString ( ) ) ) + "<br//>" ) ) ; str . append ( ( ( "float1Param:<seq2seq4repair_space>" + ( float1Param ) ) + "<br//>" ) ) ; str . append ( ( ( "float2Param:<seq2seq4repair_space>" + ( float2Param . toString ( ) ) ) + "<br//>" ) ) ; str . append ( ( ( "double1Param:<seq2seq4repair_space>" + ( double1Param ) ) + "<br//>" ) ) ; str . append ( ( ( "double2Param:<seq2seq4repair_space>" + ( double2Param . toString ( ) ) ) + "<br//>" ) ) ; str . append ( ( ( "dateParam:<seq2seq4repair_space>" + ( dateParam ) ) + "<br//>" ) ) ; str . append ( ( ( "hexParam:<seq2seq4repair_space>" + ( hexParam ) ) + "<br//>" ) ) ; <START_BUG> getResponse ( ) . write ( str . toString ( ) ) ; <END_BUG> super . onComponentTagBody ( markupStream , openTag ) ; } }

Fix:
getResponse ( ) . write ( str ) ;
Buggy code:
public class TestScoreCachingWrappingScorer extends LuceneTestCase { private static final class SimpleScorer extends Scorer { private int idx = 0 ; private int doc = - 1 ; public SimpleScorer ( Weight weight ) { } @ Override public float score ( ) { } @ Override public int freq ( ) throws IOException { } @ Override public int docID ( ) { } @ Override public int nextDoc ( ) { } @ Override public int advance ( int target ) { } @ Override public long cost ( ) { } } private static final class ScoreCachingCollector extends SimpleCollector { private int idx = 0 ; private Scorer scorer ; float [ ] mscores ; public ScoreCachingCollector ( int numToCollect ) { } @ Override public void collect ( int doc ) throws IOException { } @ Override public void setScorer ( Scorer scorer ) { } @ Override public boolean acceptsDocsOutOfOrder ( ) { } } private static final float [ ] scores = new float [ ] { 0.7767749F , 1.7839992F , 8.9925785F , 7.9608946F , 0.07948637F , 2.6356435F , 7.4950366F , 7.1490803F , 8.108544F , 4.961808F , 2.2423935F , 7.285586F , 4.6699767F } ; public void testGetScores ( ) throws Exception { Directory directory = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , directory ) ; writer . commit ( ) ; IndexReader ir = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> IndexSearcher searcher = newSearcher ( ir ) ; Weight fake = new TermQuery ( new Term ( "fake" , "weight" ) ) . createWeight ( searcher ) ; Scorer s = new TestScoreCachingWrappingScorer . SimpleScorer ( fake ) ; TestScoreCachingWrappingScorer . ScoreCachingCollector scc = new TestScoreCachingWrappingScorer . ScoreCachingCollector ( TestScoreCachingWrappingScorer . scores . length ) ; scc . setScorer ( s ) ; int doc ; while ( ( doc = s . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) { scc . collect ( doc ) ; } for ( int i = 0 ; i < ( TestScoreCachingWrappingScorer . scores . length ) ; i ++ ) { assertEquals ( TestScoreCachingWrappingScorer . scores [ i ] , scc . mscores [ i ] , 0.0F ) ; } ir . close ( ) ; directory . close ( ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class ImportExportPage extends WorkbenchWizardSelectionPage { private static final String DIALOG_SETTING_SECTION_NAME = "ImportExportPage." ; private static final String IMPORT_EXPORT_SELECTION = ( ImportExportPage . DIALOG_SETTING_SECTION_NAME ) + "STORE_SELECTED_TRANSFER_ID" ; private static final String STORE_SELECTED_IMPORT_WIZARD_ID = ( ImportExportPage . DIALOG_SETTING_SECTION_NAME ) + "STORE_SELECTED_IMPORT_WIZARD_ID" ; private static final String STORE_SELECTED_EXPORT_WIZARD_ID = ( ImportExportPage . DIALOG_SETTING_SECTION_NAME ) + "STORE_SELECTED_EXPORT_WIZARD_ID" ; private static final int IMPORT_SELECTION = 0 ; private static final int EXPORT_SELECTION = 1 ; private TabFolder tabFolder ; private ImportExportPage . ImportExportListViewer exportList ; private ImportExportPage . ImportExportListViewer importList ; private AdaptableList importWizardsList ; private AdaptableList exportWizardsList ; private String initialPageId = null ; protected class ImportExportListViewer { private static final int SIZING_LISTS_HEIGHT = 200 ; private AdaptableList elements ; private String message ; private TableViewer viewer ; protected ImportExportListViewer ( AdaptableList elements , String msg ) { } protected Composite createViewer ( TabFolder folder ) { } private void createTableViewer ( Composite parent ) { <START_BUG> Table table = new Table ( parent , SWT . NONE ) ; <END_BUG> table . setFont ( parent . getFont ( ) ) ; viewer = new TableViewer ( table ) ; viewer . setContentProvider ( new WizardContentProvider ( ) ) ; viewer . setLabelProvider ( new WorkbenchLabelProvider ( ) ) ; viewer . setSorter ( new WorkbenchViewerSorter ( ) ) ; viewer . setInput ( elements ) ; } protected TableViewer getViewer ( ) { } private void layoutTopControl ( Control control ) { } } protected ImportExportPage ( IWorkbench aWorkbench , IStructuredSelection currentSelection ) { } public void createControl ( Composite parent ) { } protected void createTabs ( ) { } private Composite createImportTab ( ) { } private void listDoubleClicked ( ISelection selection ) { } private void tabSelectionChanged ( ) { } private void updateSelectedNode ( WorkbenchWizardElement wizardElement ) { } private void updateMessage ( int selected ) { } private void listSelectionChanged ( ISelection selection ) { } private Composite createExportTab ( ) { } protected AdaptableList getAvailableExportWizards ( ) { } protected AdaptableList getAvailableImportWizards ( ) { } private IWizardNode createWizardNode ( IWizardDescriptor element ) { } protected void restoreWidgetValues ( ) { } protected void setWizardElements ( int selectedTab ) { } public void saveWidgetValues ( ) { } public IWizardPage getNextPage ( ) { } public void setInitialPage ( String pageId ) { } }

Fix:
Table table = new Table ( parent , SWT . BORDER ) ;
Buggy code:
public class WorkbenchPreview implements IThemePreview { private IPreferenceStore store = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) ; private IPreferenceStore apiStore = PrefUtil . getAPIPreferenceStore ( ) ; private boolean disposed = false ; private CTabFolder folder ; private ITheme theme ; private ToolBar toolBar ; private CLabel viewMessage ; private ViewForm viewForm ; private IPropertyChangeListener fontAndColorListener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { } } ; private IPropertyChangeListener preferenceListener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { } } ; public void createControl ( Composite parent , ITheme currentTheme ) { } protected void setTabStyle ( ) { boolean traditionalTab = apiStore . getBoolean ( SHOW_TRADITIONAL_STYLE_TABS ) ; <START_BUG> folder . setSimpleTab ( traditionalTab ) ; <END_BUG> } protected void setTabPosition ( ) { } private void setColorsAndFonts ( ) { } public void dispose ( ) { } }

Fix:
folder . setSimple ( traditionalTab ) ;