nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CompilationUnitProblemFinder extends Compiler { protected CompilationUnitProblemFinder ( INameEnvironment environment , IErrorHandlingPolicy policy , Map settings , ICompilerRequestor requestor , IProblemFactory problemFactory ) { } public void accept ( ISourceType [ ] sourceTypes , PackageBinding packageBinding ) { CompilationResult result = new CompilationResult ( sourceTypes [ 0 ] . getFileName ( ) , 1 , 1 , this . options . maxProblemsPerUnit ) ; CompilationUnitDeclaration unit = SourceTypeConverter . buildCompilationUnit ( sourceTypes , true , true , true , lookupEnvironment . problemReporter , result ) ; if ( unit != null ) { this . lookupEnvironment . buildTypeBindings ( unit ) ; <START_BUG> this . lookupEnvironment . completeTypeBindings ( unit , true ) ; <END_BUG> } } protected static IErrorHandlingPolicy getHandlingPolicy ( ) { } protected static INameEnvironment getNameEnvironment ( ICompilationUnit sourceUnit ) throws JavaModelException { } protected static ICompilerRequestor getRequestor ( ) { } protected static IProblemFactory getProblemFactory ( final char [ ] fileName , final IProblemRequestor problemRequestor , final IProgressMonitor monitor ) { } public static CompilationUnitDeclaration process ( CompilationUnitDeclaration unit , ICompilationUnit unitElement , IProblemRequestor problemRequestor , IProgressMonitor monitor ) throws JavaModelException { } public static CompilationUnitDeclaration process ( ICompilationUnit unitElement , IProblemRequestor problemRequestor , IProgressMonitor monitor ) throws JavaModelException { } }

Fix:
this . lookupEnvironment . completeTypeBindings ( unit ) ;
Buggy code:
public class ConnectionFactory implements TestListener { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static TopicConnectionFactory factory = null ; private static QueueConnectionFactory qfactory = null ; private static final int MAX_RETRY = 5 ; private static final int PAUSE_MILLIS = 100 ; protected ConnectionFactory ( ) { } public void testStarted ( String test ) { } public void testEnded ( String test ) { } public synchronized void testEnded ( ) { } public void testStarted ( ) { } public void testIterationStart ( LoopIterationEvent event ) { } public static synchronized TopicConnectionFactory getTopicConnectionFactory ( Context ctx , String factoryName ) { } public static synchronized QueueConnectionFactory getQueueConnectionFactory ( Context ctx , String factoryName ) { } public static synchronized TopicConnection getTopicConnection ( ) throws JMSException { } public static synchronized QueueConnection getQueueConnection ( Context ctx , String queueConn ) { <START_BUG> if ( ( ConnectionFactory . factory ) != null ) { <END_BUG> try { return ConnectionFactory . qfactory . createQueueConnection ( ) ; } catch ( JMSException e ) { ConnectionFactory . log . error ( e . getMessage ( ) ) ; } } return null ; } }

Fix:
if ( ( ConnectionFactory . qfactory ) != null ) {
Buggy code:
public class IssueTypePeer extends org . tigris . scarab . om . BaseIssueTypePeer { public static Integer ROOT_KEY = new Integer ( 0 ) ; private static final String ISSUE_TYPE_PEER = "IssueTypePeer" ; private static final String GET_ALL_ISSUE_TYPES = "getAllIssueTypes" ; private static final String RETRIEVE_BY_PK = "retrieveByPK" ; public static IssueType retrieveByPK ( ObjectKey pk ) throws TorqueException { } public static List getAllIssueTypes ( boolean deleted , String sortColumn , String sortPolarity ) throws Exception { } public static List getAllIssueTypes ( boolean includeDeleted ) throws Exception { } public static List getDefaultIssueTypes ( ) throws Exception { } private static Criteria addSortOrder ( Criteria crit , String sortColumn , String sortPolarity ) { } public static boolean isUnique ( String name , Integer id ) throws Exception { boolean unique = true ; Criteria crit = new Criteria ( ) . add ( NAME , name . trim ( ) ) ; crit . setIgnoreCase ( true ) ; List types = IssueTypePeer . doSelect ( crit ) ; if ( ( types . size ( ) ) > 0 ) { for ( int i = 0 ; i < ( types . size ( ) ) ; i ++ ) { IssueType it = ( ( IssueType ) ( types . get ( i ) ) ) ; <START_BUG> if ( ( ( id != null ) && ( ! ( it . getIssueTypeId ( ) . equals ( id ) ) ) ) && ( it . getName ( ) . trim ( ) . toLowerCase ( ) . equals ( name . trim ( ) . toLowerCase ( ) ) ) ) { <END_BUG> unique = false ; } } } return unique ; } }

Fix:
if ( ( ( id != null ) && ( ! ( it . getIssueTypeId ( ) . equals ( id ) ) ) ) && ( it . getName ( ) . trim ( ) . equalsIgnoreCase ( name . trim ( ) ) ) ) {
Buggy code:
public class Vorlesung { private int id ; private int kursID ; private FachInstanz fachInstanz ; private int dozentID ; private int semester ; public static ArrayList < Vorlesung > getAll ( Kurs kurs , int semester ) throws WebServiceException { kurs . getDirectAttributes ( ) ; if ( semester <= 0 ) { throw new WebServiceException ( ExceptionStatus . INVALID_ARGUMENT_NUMBER ) ; } DatabaseConnection db = ConnectionPool . getConnectionPool ( ) . getConnection ( ) ; ArrayList < Object > fieldValues = new ArrayList < Object > ( ) ; fieldValues . add ( kurs . getID ( ) ) ; fieldValues . add ( semester ) ; <START_BUG> ArrayList < TypeHashMap < String , Object > > resultList = db . doSelectingQuery ( "SELECT<seq2seq4repair_space>id,<seq2seq4repair_space>kurs,<seq2seq4repair_space>fachInstanz,<seq2seq4repair_space>dozent,<seq2seq4repair_space>semester<seq2seq4repair_space>FROM<seq2seq4repair_space>vorlesung<seq2seq4repair_space>WHERE<seq2seq4repair_space>kurs<seq2seq4repair_space>=<seq2seq4repair_space>?,<seq2seq4repair_space>semester<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>fachInstanz<seq2seq4repair_space>ASC" , fieldValues ) ; <END_BUG> ArrayList < Vorlesung > vorlesungList = new ArrayList < Vorlesung > ( ) ; for ( TypeHashMap < String , Object > result : resultList ) { Vorlesung v = new Vorlesung ( result . getInt ( "id" ) ) ; v . kursID = result . getInt ( "kurs" ) ; v . fachInstanz = new FachInstanz ( result . getInt ( "fachInstanz" ) ) . getDirectAttributes ( ) ; v . dozentID = result . getInt ( "dozent" ) ; v . semester = result . getInt ( "semester" ) ; vorlesungList . add ( v ) ; } return vorlesungList ; } public Vorlesung ( int id ) throws WebServiceException { } public Vorlesung getDirectAttributes ( ) throws WebServiceException { } public Dozent getDozent ( ) throws WebServiceException { } public Vorlesung create ( ) throws WebServiceException { } public Vorlesung update ( ) throws WebServiceException { } public void delete ( ) throws WebServiceException { } public void checkDirectAttributes ( ) throws WebServiceException { } public int getID ( ) { } public void setKursID ( int kursID ) { } public void setSemester ( int semester ) { } }

Fix:
ArrayList < TypeHashMap < String , Object > > resultList = db . doSelectingQuery ( "SELECT<seq2seq4repair_space>id,<seq2seq4repair_space>kurs,<seq2seq4repair_space>fachInstanz,<seq2seq4repair_space>dozent,<seq2seq4repair_space>semester<seq2seq4repair_space>FROM<seq2seq4repair_space>vorlesung<seq2seq4repair_space>WHERE<seq2seq4repair_space>kurs<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>AND<seq2seq4repair_space>semester<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>fachInstanz<seq2seq4repair_space>ASC" , fieldValues ) ;
Buggy code:
public class PrintAction extends AbstractColumbaAction implements SelectionListener { public PrintAction ( FrameMediator controller ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( getFrameMediator ( ) . getSelectionManager ( ) . getSelection ( "mail.table" ) ) ) ; <END_BUG> Charset charset = ( ( org . columba . core . charset . CharsetOwnerInterface ) ( getFrameMediator ( ) ) ) . getCharset ( ) ; PrintMessageCommand c = new PrintMessageCommand ( r , charset ) ; processor . addOp ( c ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference r = ( ( FolderCommandReference ) ( getFrameMediator ( ) . getSelectionManager ( ) . getSelection ( "mail.table" ) ) ) ;
Buggy code:
public class RMIAdaptorService extends ServiceMBeanSupport implements RMIAdaptorServiceMBean { public static String JNDI_NAME = "jmx:rmi" ; public static String JMX_NAME = "jmx" ; public static String PROTOCOL_NAME = "rmi" ; private MBeanServer server ; private RMIAdaptorImpl adaptor ; private String mHost ; private String mName ; public RMIAdaptorService ( ) { } public RMIAdaptorService ( String name ) { } public ObjectName getObjectName ( MBeanServer server , ObjectName name ) throws MalformedObjectNameException { this . server = server ; <START_BUG> return new ObjectName ( OBJECT_NAME ) ; <END_BUG> } public String getName ( ) { } public String getJNDIName ( ) { } protected void startService ( ) throws Exception { } protected void stopService ( ) { } }

Fix:
return OBJECT_NAME ;
Buggy code:
public class TestJapaneseBaseFormFilter extends BaseTokenStreamTestCase { private Analyzer analyzer = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { } } ; public void testBasics ( ) throws IOException { } public void testEnglish ( ) throws IOException { } public void testRandomStrings ( ) throws IOException { <START_BUG> checkRandomData ( random ( ) , analyzer , atLeast ( 10000 ) ) ; <END_BUG> } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , analyzer , atLeast ( 1000 ) ) ;
Buggy code:
public class StructureSearchManager { public List findMatches ( String pattern , IProgramElement . Kind kind ) { List matches = new ArrayList ( ) ; <START_BUG> StructureModel model = Ajde . getDefault ( ) . getStructureModelManager ( ) . getStructureModel ( ) ; <END_BUG> if ( model . equals ( NO_STRUCTURE ) ) { return null ; } else { return findMatchesHelper ( ( ( IProgramElement ) ( model . getRoot ( ) ) ) , pattern , kind , matches ) ; } } private List findMatchesHelper ( IProgramElement node , String pattern , IProgramElement . Kind kind , List matches ) { } }

Fix:
StructureModel model = Ajde . getDefault ( ) . getStructureModelManager ( ) . getModel ( ) ;
Buggy code:
public class Clearcase extends AbstractVersionControl { public static final String COMMANDPATH = "cleartool.path" ; private final Set < String > checkedOut = new HashSet < String > ( ) ; private final String commandPath ; public Clearcase ( Properties controlProperties ) { } @ Override public void prepareSave ( File file ) { } @ Override public void commit ( File file , String message ) { Map < String , Object > map = new HashMap < String , Object > ( ) ; <START_BUG> map . put ( "file" , file . getName ( ) ) ; <END_BUG> CommandLine cmdLine = new CommandLine ( commandPath ) ; cmdLine . addArgument ( "checkin" ) ; if ( ( message != null ) && ( ( message . length ( ) ) > 0 ) ) { cmdLine . addArgument ( "-c" ) ; cmdLine . addArgument ( "${comment}" ) ; map . put ( "comment" , message ) ; } else { cmdLine . addArgument ( "-nc" ) ; } cmdLine . addArgument ( "${file}" ) ; cmdLine . setSubstitutionMap ( map ) ; execute ( cmdLine , null ) ; checkedOut . remove ( file . getName ( ) ) ; } @ Override public void label ( String label , File ... targets ) { } private void mklbtype ( String label ) { } private void mklabel ( String label , File ... targets ) { } }

Fix:
map . put ( "file" , file ) ;
Buggy code:
public class BlockingQueueTest { @ Test public void basicSingleThreaded ( ) throws Exception { } @ Test public void checkClassLoaderCache ( ) throws Exception { ConcurrentQueueSpec qs = ConcurrentQueueSpec . createBoundedSpsc ( 16 ) ; BlockingQueue < Integer > q1 = QueueFactory . newBlockingQueue ( qs ) ; BlockingQueue < Integer > q2 = QueueFactory . newBlockingQueue ( qs ) ; <START_BUG> Assert . assertTrue ( ( ( q1 . getClass ( ) . getClassLoader ( ) ) == ( q2 . getClass ( ) . getClassLoader ( ) ) ) ) ; <END_BUG> } }

Fix:
Assert . assertTrue ( ( ( q1 . getClass ( ) ) == ( q2 . getClass ( ) ) ) ) ;
Buggy code:
public class BcelWeaver implements IWeaver { private BcelWorld world ; private CrosscuttingMembersSet xcutSet ; public BcelWeaver ( BcelWorld world ) { } public BcelWeaver ( ) { } private Map sourceJavaClasses = new HashMap ( ) ; private List addedClasses = new ArrayList ( ) ; private List deletedTypenames = new ArrayList ( ) ; private boolean needToReweaveWorld = false ; private List shadowMungerList = null ; private List typeMungerList = null ; private ZipOutputStream zipOutputStream ; public void setShadowMungers ( List l ) { } public void addLibraryAspect ( String aspectName ) { } public void addLibraryJarFile ( File inFile ) throws IOException { } public void addJarFile ( File inFile , File outDir ) throws IOException { } public void addClassFile ( UnwovenClassFile classFile ) { } public void deleteClassFile ( String typename ) { } public void prepareForWeave ( ) { } public void dumpUnwoven ( File file ) throws IOException { } public void dumpUnwoven ( ) throws IOException { } public Collection weave ( File file ) throws IOException { } public Collection weave ( ) throws IOException { } private void weave ( ResolvedTypeX onType ) { } LazyClassGen weave ( UnwovenClassFile classFile , BcelObjectType classType ) throws IOException { JavaClass javaClass = classType . getJavaClass ( ) ; List shadowMungers = fastMatch ( shadowMungerList , javaClass ) ; List typeMungers = fastMatch ( classType . getInterTypeMungers ( ) , javaClass ) ; LazyClassGen clazz = null ; <START_BUG> if ( ( ( shadowMungers . size ( ) ) > 0 ) || ( ( typeMungers . size ( ) ) > 0 ) ) { <END_BUG> clazz = classType . getLazyClassGen ( ) ; try { boolean isChanged = BcelClassWeaver . weave ( world , clazz , shadowMungers , typeMungers ) ; if ( isChanged ) { dump ( classFile , clazz ) ; return clazz ; } } catch ( RuntimeException re ) { System . err . println ( "trouble<seq2seq4repair_space>in:<seq2seq4repair_space>" ) ; clazz . print ( System . err ) ; throw re ; } catch ( Error re ) { System . err . println ( "trouble<seq2seq4repair_space>in:<seq2seq4repair_space>" ) ; clazz . print ( System . err ) ; throw re ; } } dumpUnchanged ( classFile ) ; return clazz ; } private void dumpUnchanged ( UnwovenClassFile classFile ) throws IOException { } private String getEntryName ( String className ) { } private void dump ( UnwovenClassFile classFile , LazyClassGen clazz ) throws IOException { } private void writeZipEntry ( String name , byte [ ] bytes ) throws IOException { } private List fastMatch ( List list , JavaClass javaClass ) { } }

Fix:
if ( ( ( ( shadowMungers . size ( ) ) > 0 ) || ( ( typeMungers . size ( ) ) > 0 ) ) || ( classType . isAspect ( ) ) ) {
Buggy code:
public class LS extends IType { private Usable usable = new Usable ( ) ; public LS ( String addr , int rd , int rs , int rt , String immORoffset ) { } @ Override public String ALU ( CachedTables ct ) { } @ Override public int specialFunction ( CachedTables ct ) { <START_BUG> ct . getRtc ( ) . saveRegisterValueToCache ( this . getRd ( ) , this . ALU ( ct ) . toUpperCase ( ) ) ; <END_BUG> ct . getRtc ( ) . drawToRegisterTable ( ) ; return - 1 ; } @ Override public boolean haveDataHazard ( int rd ) { } }

Fix:
ct . getRtc ( ) . saveFRegisterValueToCache ( this . getRd ( ) , this . ALU ( ct ) . toUpperCase ( ) ) ;
Buggy code:
public class FitnessEvaluatorTest { private FitnessFunction func = new FitnessFunction ( ) { @ Override public double eval ( double totalError , int numberInSpecies ) { } @ Override public double evalUnscaled ( double totalError ) { } } ; @ Test public void testSimpleFitness ( ) { } @ Test public void testBasicErrorCalcs ( ) { } @ Test public void testAverageError ( ) { NeuralNetwork nn = new NeuralNetwork ( 2 , 1 , new double [ ] { 1000 , 1000 } ) ; FitnessEvaluator evaluator = new FitnessEvaluator ( null , func ) ; Species spec = new Species ( nn ) ; double [ ] [ ] inputs = new double [ 4 ] [ 2 ] ; double [ ] [ ] expectedOutputs = new double [ 4 ] [ 1 ] ; inputs [ 0 ] [ 0 ] = 1 ; inputs [ 0 ] [ 1 ] = 1 ; expectedOutputs [ 0 ] [ 0 ] = 0 ; inputs [ 1 ] [ 0 ] = 1 ; inputs [ 1 ] [ 1 ] = 0 ; expectedOutputs [ 1 ] [ 0 ] = 1 ; inputs [ 2 ] [ 0 ] = 1 ; inputs [ 2 ] [ 1 ] = 0 ; expectedOutputs [ 2 ] [ 0 ] = 1 ; inputs [ 3 ] [ 0 ] = 0 ; inputs [ 3 ] [ 1 ] = 0 ; expectedOutputs [ 3 ] [ 0 ] = 0 ; <START_BUG> assertThat ( evaluator . evaluateFitness ( nn , inputs , expectedOutputs ) , equalTo ( func . eval ( ( 1.25 // 4 ) , 1 ) ) ) ; <END_BUG> } @ Test public void testAllOutputErrorConsidered ( ) { } }

Fix:
assertThat ( evaluator . evaluateFitness ( nn , inputs , expectedOutputs ) , equalTo ( func . eval ( 1.25 , 1 ) ) ) ;
Buggy code:
public class Metodos { public static void leerUsuarios ( ) throws IOException , InterruptedException { } public static int contarUsuarios ( ) throws FileNotFoundException , IOException { BufferedReader leer = new BufferedReader ( new FileReader ( "C:\\Users\\Alumnot\\Documents\\Usuarios\\usuarios.txt" ) ) ; String linea = null ; <START_BUG> int count = 0 ; <END_BUG> while ( ( linea = leer . readLine ( ) ) != null ) { if ( ! ( ( linea . indexOf ( '.' ) ) >= 0 ) ) { count ++ ; } } leer . close ( ) ; return count ; } public static void leerContenidoUsuarios ( String user , ProcessBuilder p ) throws IOException , InterruptedException { } public static void mostrarContenido ( ) throws FileNotFoundException , IOException { } }

Fix:
int count = 1 ;
Buggy code:
public class TestTermScorer extends LuceneTestCase { protected Directory directory ; private static final String FIELD = "field" ; protected String [ ] values = new String [ ] { "all" , "dogs<seq2seq4repair_space>dogs" , "like" , "playing" , "fetch" , "all" } ; protected IndexSearcher indexSearcher ; protected IndexReader indexReader ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; directory = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , directory , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) ) . setMergePolicy ( newLogMergePolicy ( ) ) . setSimilarity ( new DefaultSimilarity ( ) ) ) ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { Document doc = new Document ( ) ; doc . add ( newTextField ( TestTermScorer . FIELD , values [ i ] , YES ) ) ; writer . addDocument ( doc ) ; } indexReader = SlowCompositeReaderWrapper . wrap ( writer . getReader ( ) ) ; <START_BUG> writer . close ( ) ; <END_BUG> indexSearcher = newSearcher ( indexReader ) ; indexSearcher . setSimilarity ( new DefaultSimilarity ( ) ) ; } @ Override public void tearDown ( ) throws Exception { } public void test ( ) throws IOException { } public void testNext ( ) throws Exception { } public void testAdvance ( ) throws Exception { } private class TestHit { public int doc ; public float score ; public TestHit ( int doc , float score ) { } @ Override public String toString ( ) { } } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class DDCreator extends MatchingTask { private File descriptorDirectory ; private File generatedFilesDirectory ; private String classpath ; public void execute ( ) throws BuildException { if ( ! ( descriptorDirectory . isDirectory ( ) ) ) { throw new BuildException ( ( ( "descriptors<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( descriptorDirectory . getPath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ; } if ( ! ( generatedFilesDirectory . isDirectory ( ) ) ) { throw new BuildException ( ( ( "dest<seq2seq4repair_space>directory<seq2seq4repair_space>" + ( generatedFilesDirectory . getPath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ) ; } String args = ( ( descriptorDirectory ) + "<seq2seq4repair_space>" ) + ( generatedFilesDirectory ) ; DirectoryScanner ds = super . getDirectoryScanner ( descriptorDirectory ) ; String [ ] files = ds . getIncludedFiles ( ) ; for ( int i = 0 ; i < ( files . length ) ; ++ i ) { args += "<seq2seq4repair_space>" + ( files [ i ] ) ; } String systemClassPath = System . getProperty ( "java.class.path" ) ; String execClassPath = project . translatePath ( ( ( systemClassPath + ":" ) + ( classpath ) ) ) ; Java ddCreatorTask = ( ( Java ) ( project . createTask ( "java" ) ) ) ; ddCreatorTask . setFork ( "yes" ) ; ddCreatorTask . setClassname ( "org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper" ) ; ddCreatorTask . setArgs ( args ) ; <START_BUG> ddCreatorTask . setClasspath ( execClassPath ) ; <END_BUG> if ( ( ddCreatorTask . executeJava ( ) ) != 0 ) { throw new BuildException ( "Execution<seq2seq4repair_space>of<seq2seq4repair_space>ddcreator<seq2seq4repair_space>helper<seq2seq4repair_space>failed" ) ; } } public void setDescriptors ( String dirName ) { } public void setDest ( String dirName ) { } public void setClasspath ( String s ) { } }

Fix:
ddCreatorTask . setClasspath ( new Path ( execClassPath ) ) ;
Buggy code:
public class TeamReviewFragment extends Fragment { private Team mTeam ; private TextView mTeamName ; private TextView mTeamScore ; private TextView mTeam2ptFG ; private TextView mTeam2ptFGPercent ; private TextView mTeam3ptFG ; private TextView mTeam3ptFGPercent ; private TextView mTeamFT ; private TextView mTeamFTPercent ; private TextView mTeamOffRebs ; private TextView mTeamDefRebs ; private TextView mTeamTotalRebs ; private TextView mTeamAssists ; private TextView mTeamSteals ; private TextView mTeamBlocks ; private TextView mTeamTOs ; private TextView mTeamFouls ; private TextView mTeamTotalBallPoss ; public TeamReviewFragment ( Team team ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void setValues ( ) { mTeamName . setText ( mTeam . getName ( ) ) ; mTeamScore . setText ( String . valueOf ( mTeam . getTotalScore ( ) ) ) ; mTeam2ptFG . setText ( StringUtils . getShotFraction ( mTeam . get2ptFGMade ( ) , mTeam . get2ptFGMiss ( ) ) ) ; mTeam2ptFGPercent . setText ( StringUtils . getShotPercentage ( mTeam . get2ptFGMade ( ) , mTeam . get2ptFGMiss ( ) ) ) ; mTeam3ptFG . setText ( StringUtils . getShotFraction ( mTeam . get3ptFGMade ( ) , mTeam . get3ptFGMiss ( ) ) ) ; mTeam3ptFGPercent . setText ( StringUtils . getShotPercentage ( mTeam . get3ptFGMade ( ) , mTeam . get3ptFGMiss ( ) ) ) ; mTeamFT . setText ( StringUtils . getShotFraction ( mTeam . getFTMade ( ) , mTeam . getFTMiss ( ) ) ) ; mTeamFTPercent . setText ( StringUtils . getShotPercentage ( mTeam . getFTMade ( ) , mTeam . getFTMiss ( ) ) ) ; mTeamOffRebs . setText ( String . valueOf ( mTeam . getOffRebounds ( ) ) ) ; mTeamDefRebs . setText ( String . valueOf ( mTeam . getDefRebounds ( ) ) ) ; mTeamTotalRebs . setText ( String . valueOf ( mTeam . getTotalRebounds ( ) ) ) ; <START_BUG> mTeamAssists . setText ( String . valueOf ( mTeam . getSteals ( ) ) ) ; <END_BUG> mTeamSteals . setText ( String . valueOf ( mTeam . getSteals ( ) ) ) ; mTeamBlocks . setText ( String . valueOf ( mTeam . getBlocks ( ) ) ) ; mTeamTOs . setText ( String . valueOf ( mTeam . getTurnovers ( ) ) ) ; mTeamFouls . setText ( String . valueOf ( mTeam . getTotalFouls ( ) ) ) ; mTeamTotalBallPoss . setText ( StringUtils . getMinSecFormattedString ( mTeam . getPossessionTimeSec ( ) ) ) ; } }

Fix:
mTeamAssists . setText ( String . valueOf ( mTeam . getAssists ( ) ) ) ;
Buggy code:
public abstract class HierarchyBuilder { protected TypeHierarchy hierarchy ; protected NameLookup nameLookup ; protected HierarchyResolver hierarchyResolver ; protected Map infoToHandle ; protected String focusQualifiedName ; public HierarchyBuilder ( TypeHierarchy hierarchy ) throws JavaModelException { } public abstract void build ( boolean computeSubtypes ) throws CoreException , JavaModelException { } protected void buildSupertypes ( ) { } public void connect ( IGenericType type , IType typeHandle , IType superclassHandle , IType [ ] superinterfaceHandles ) { } protected IType getHandle ( IGenericType genericType , ReferenceBinding binding ) { } protected IType getType ( ) { } protected IType lookupBinaryHandle ( IBinaryType typeInfo ) { int flag ; String qualifiedName ; switch ( TypeDeclaration . kind ( typeInfo . getModifiers ( ) ) ) { case TypeDeclaration . CLASS_DECL : flag = NameLookup . ACCEPT_CLASSES ; break ; case TypeDeclaration . INTERFACE_DECL : flag = NameLookup . ACCEPT_INTERFACES ; break ; case TypeDeclaration . ENUM_DECL : flag = NameLookup . ACCEPT_ENUMS ; break ; default : flag = NameLookup . ACCEPT_ANNOTATIONS ; break ; } char [ ] bName = typeInfo . getName ( ) ; qualifiedName = new String ( ClassFile . translatedName ( bName ) ) ; if ( qualifiedName . equals ( this . focusQualifiedName ) ) return getType ( ) ; NameLookup . Answer answer = this . nameLookup . findType ( qualifiedName , false , flag , true , false , false , null ) ; <START_BUG> return answer == null ? null : answer . type ; <END_BUG> } protected void worked ( IProgressMonitor monitor , int work ) { } protected ICompilationUnit createCompilationUnitFromPath ( Openable handle , IFile file ) { } protected IBinaryType createInfoFromClassFile ( Openable handle , IResource file ) { } protected IBinaryType createInfoFromClassFileInJar ( Openable classFile ) { } }

Fix:
return ( ( answer == null ) || ( ( answer . type ) == null ) ) || ( ! ( answer . type . isBinary ( ) ) ) ? null : answer . type ;
Buggy code:
class ConstructorSignatureImpl extends CodeSignatureImpl implements ConstructorSignature { private Constructor constructor ; ConstructorSignatureImpl ( int modifiers , Class declaringType , Class [ ] parameterTypes , String [ ] parameterNames , Class [ ] exceptionTypes ) { } ConstructorSignatureImpl ( String stringRep ) { } public String getName ( ) { } protected String createToString ( StringMaker sm ) { } public Constructor getConstructor ( ) { if ( ( constructor ) == null ) { try { <START_BUG> constructor = declaringType . getDeclaredConstructor ( getParameterTypes ( ) ) ; <END_BUG> } catch ( Exception ex ) { } } return constructor ; } }

Fix:
constructor = getDeclaringType ( ) . getDeclaredConstructor ( getParameterTypes ( ) ) ;
Buggy code:
public class CCCheckin extends ClearCase { private String m_Comment = null ; private String m_Cfile = null ; private boolean m_Nwarn = false ; private boolean m_Ptime = false ; private boolean m_Keep = false ; private boolean m_Identical = true ; public void execute ( ) throws BuildException { Commandline commandLine = new Commandline ( ) ; Project aProj = getProject ( ) ; int result = 0 ; if ( ( getViewPath ( ) ) == null ) { setViewPath ( aProj . getBaseDir ( ) . getPath ( ) ) ; } commandLine . setExecutable ( getClearToolCommand ( ) ) ; commandLine . createArgument ( ) . setValue ( COMMAND_CHECKIN ) ; checkOptions ( commandLine ) ; result = run ( commandLine ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; <START_BUG> throw new BuildException ( msg , location ) ; <END_BUG> } } private void checkOptions ( Commandline cmd ) { } public void setComment ( String comment ) { } public String getComment ( ) { } public void setCommentFile ( String cfile ) { } public String getCommentFile ( ) { } public void setNoWarn ( boolean nwarn ) { } public boolean getNoWarn ( ) { } public void setPreserveTime ( boolean ptime ) { } public boolean getPreserveTime ( ) { } public void setKeepCopy ( boolean keep ) { } public boolean getKeepCopy ( ) { } public void setIdentical ( boolean identical ) { } public boolean getIdentical ( ) { } private void getCommentCommand ( Commandline cmd ) { } private void getCommentFileCommand ( Commandline cmd ) { } public static final String FLAG_COMMENT = "-c" ; public static final String FLAG_COMMENTFILE = "-cfile" ; public static final String FLAG_NOCOMMENT = "-nc" ; public static final String FLAG_NOWARN = "-nwarn" ; public static final String FLAG_PRESERVETIME = "-ptime" ; public static final String FLAG_KEEPCOPY = "-keep" ; public static final String FLAG_IDENTICAL = "-identical" ; }

Fix:
throw new BuildException ( msg , getLocation ( ) ) ;
Buggy code:
public class TestMultiThreadMapIterator { private static final int NTHREADS = 7 ; public static void main ( final String [ ] args ) { final Map < Object , Object > bt = new ConcurrentHashTrieMap < Object , Object > ( ) ; for ( int j = 0 ; j < ( 50 * 1000 ) ; j ++ ) { final Object [ ] objects = TestMultiThreadMapIterator . getObjects ( j ) ; for ( final Object o : objects ) { bt . put ( o , o ) ; } } { final ExecutorService es = Executors . newFixedThreadPool ( TestMultiThreadMapIterator . NTHREADS ) ; for ( int i = 0 ; i < ( TestMultiThreadMapIterator . NTHREADS ) ; i ++ ) { final int threadNo = i ; es . execute ( new Runnable ( ) { @ Override public void run ( ) { for ( final Iterator < Map . Entry < Object , Object > > i = bt . entrySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) { final Map . Entry < Object , Object > e = i . next ( ) ; if ( TestMultiThreadMapIterator . accepts ( threadNo , TestMultiThreadMapIterator . NTHREADS , e . getKey ( ) ) ) { e . setValue ( ( "TEST:" + threadNo ) ) ; } } } } ) ; } es . shutdown ( ) ; try { es . awaitTermination ( 3600L , TimeUnit . SECONDS ) ; } catch ( final InterruptedException e ) { e . printStackTrace ( ) ; } } int count = 0 ; for ( final Object value : bt . values ( ) ) { TestHelper . assertTrue ( ( value instanceof String ) ) ; count ++ ; } TestHelper . assertEquals ( ( ( ( 50000 + 2000 ) + 1000 ) + 100 ) , count ) ; final ConcurrentHashMap < Object , Object > removed = new ConcurrentHashMap < Object , Object > ( ) ; { final ExecutorService es = Executors . newFixedThreadPool ( TestMultiThreadMapIterator . NTHREADS ) ; for ( int i = 0 ; i < ( TestMultiThreadMapIterator . NTHREADS ) ; i ++ ) { final int threadNo = i ; es . execute ( new Runnable ( ) { @ Override public void run ( ) { for ( final Iterator < Map . Entry < Object , Object > > i = bt . entrySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) { final Map . Entry < Object , Object > e = i . next ( ) ; Object key = e . getKey ( ) ; if ( TestMultiThreadMapIterator . accepts ( threadNo , TestMultiThreadMapIterator . NTHREADS , key ) ) { if ( null == ( bt . get ( key ) ) ) { System . out . println ( key ) ; } i . remove ( ) ; if ( null != ( bt . get ( key ) ) ) { System . out . println ( key ) ; } removed . put ( key , key ) ; } } } } ) ; } es . shutdown ( ) ; try { es . awaitTermination ( 3600L , TimeUnit . SECONDS ) ; } catch ( final InterruptedException e ) { e . printStackTrace ( ) ; } } count = 0 ; for ( final Object value : bt . keySet ( ) ) { value . toString ( ) ; count ++ ; } for ( final Object o : bt . keySet ( ) ) { if ( ! ( removed . contains ( bt . get ( o ) ) ) ) { <START_BUG> System . out . println ( ) ; <END_BUG> } } TestHelper . assertEquals ( 0 , count ) ; TestHelper . assertEquals ( 0 , bt . size ( ) ) ; TestHelper . assertTrue ( bt . isEmpty ( ) ) ; } protected static boolean accepts ( final int threadNo , final int nThreads , final Object key ) { } static Object [ ] getObjects ( final int j ) { } }

Fix:
System . out . println ( ( "Not<seq2seq4repair_space>removed:<seq2seq4repair_space>" + o ) ) ;
Buggy code:
public class IDFactory { private static final Trace debug = Trace . create ( "idfactory" ) ; public static final String SECURITY_PROPERTY = ( IDFactory . class . getName ( ) ) + ".security" ; private static Hashtable namespaces = new Hashtable ( ) ; private static boolean securityEnabled = false ; public static final Namespace addNamespace ( Namespace n ) throws SecurityException { } protected static final Namespace addNamespace0 ( Namespace n ) { } protected static final void checkPermission ( NamespacePermission p ) throws SecurityException { } public static final boolean containsNamespace ( Namespace n ) throws SecurityException { } public static final List getNamespaces ( ) { } private static void debug ( String msg ) { } private static void dumpStack ( String msg , Throwable e ) { } protected static final boolean containsNamespace0 ( Namespace n ) { } public static final Namespace getNamespace ( Namespace n ) throws SecurityException { } public static final Namespace getNamespaceByName ( String name ) throws SecurityException { } protected static final Namespace getNamespace0 ( Namespace n ) { } public static final ID makeGUID ( ) throws IDInstantiationException { } public static final ID makeGUID ( int length ) throws IDInstantiationException { } protected static void log ( String s ) { } protected static void logException ( String s , Throwable t ) { } protected static void logAndThrow ( String s , Throwable t ) throws IDInstantiationException { } protected static void logAndThrow ( String s ) throws IDInstantiationException { } public static final ID makeID ( Namespace n , String [ ] argTypes , Object [ ] args ) throws IDInstantiationException { } public static final ID makeID ( String namespacename , String [ ] argTypes , Object [ ] args ) throws IDInstantiationException { } public static final ID makeID ( Namespace n , Object [ ] args ) throws IDInstantiationException { } public static final ID makeID ( String namespacename , Object [ ] args ) throws IDInstantiationException { Namespace n = IDFactory . getNamespaceByName ( namespacename ) ; if ( n == null ) <START_BUG> throw new IDInstantiationException ( ( ( "Namespace<seq2seq4repair_space>named<seq2seq4repair_space>" + namespacename ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; <END_BUG> return IDFactory . makeID ( n , args ) ; } public static final ID makeStringID ( String idstring ) throws IDInstantiationException { } public static final ID makeLongID ( Long l ) throws IDInstantiationException { } public static final ID makeLongID ( long l ) throws IDInstantiationException { } public static final Namespace removeNamespace ( Namespace n ) throws SecurityException { } protected static final Namespace removeNamespace0 ( Namespace n ) { } }

Fix:
throw new IDInstantiationException ( ( ( "Namespace<seq2seq4repair_space>" + namespacename ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ;
Buggy code:
public class BatchImageBuilder extends AbstractImageBuilder { protected BatchImageBuilder ( JavaBuilder javaBuilder ) { } public void build ( ) { } protected void addAllSourceFiles ( final ArrayList locations , final ArrayList typeNames ) throws CoreException { } protected void scrubOutputFolder ( ) throws CoreException { } protected void copyExtraResourcesBack ( ) throws CoreException { final IPath outputPath = outputFolder . getFullPath ( ) ; for ( int i = 0 , length = sourceFolders . length ; i < length ; i ++ ) { IContainer sourceFolder = sourceFolders [ i ] ; final IPath sourcePath = sourceFolder . getFullPath ( ) ; final int segmentCount = sourcePath . segmentCount ( ) ; sourceFolder . accept ( new IResourceVisitor ( ) { public boolean visit ( IResource resource ) throws CoreException { switch ( resource . getType ( ) ) { case IResource . FILE : String extension = resource . getFileExtension ( ) ; if ( JAVA_EXTENSION . equalsIgnoreCase ( extension ) ) return false ; if ( CLASS_EXTENSION . equalsIgnoreCase ( extension ) ) return false ; IPath partialPath = resource . getFullPath ( ) . removeFirstSegments ( segmentCount ) ; IResource copiedResource = outputFolder . getFile ( partialPath ) ; if ( copiedResource . exists ( ) ) { IMarker marker = resource . createMarker ( ProblemMarkerTag ) ; marker . setAttribute ( IMarker . MESSAGE , Util . bind ( "build.duplicateResource" ) ) ; <START_BUG> marker . setAttribute ( IMarker . SEVERITY , IMarker . SEVERITY_ERROR ) ; <END_BUG> } else { resource . copy ( copiedResource . getFullPath ( ) , true , null ) ; } return false ; case IResource . FOLDER : if ( resource . getFullPath ( ) . equals ( outputPath ) ) return false ; if ( resource . getFullPath ( ) . equals ( sourcePath ) ) return true ; getOutputFolder ( resource . getFullPath ( ) . removeFirstSegments ( segmentCount ) ) ; } return true ; } } ) ; } } protected void updateProblemsFor ( CompilationResult result ) throws CoreException { } public String toString ( ) { } }

Fix:
marker . setAttribute ( IMarker . SEVERITY , IMarker . SEVERITY_WARNING ) ;
Buggy code:
public class ExpectedUtility { private static final int anzahlSimulationsRunden = 1 ; private Spielbrett original ; private int spielerIdx ; private int spielerAnzahl ; public ExpectedUtility ( Spielbrett spbrett , int spielerIdx ) { } public double berechneExpectedUtility ( Zug zug ) { Spielbrett simulation = original . clone ( ) ; simulation . setze ( spielerIdx , zug ) ; <START_BUG> int spielerPos = zug . getAusgangsPos ( ) ; <END_BUG> int naechsterSpieler = ( ( spielerIdx ) + 1 ) % ( simulation . getAnzSpieler ( ) ) ; int weitereSpieler = ( ( ExpectedUtility . anzahlSimulationsRunden ) * ( simulation . getAnzSpieler ( ) ) ) - 1 ; return spielerPos + ( berechneUtility ( simulation , weitereSpieler , naechsterSpieler ) ) ; } private double berechneUtility ( Spielbrett brett , int weitereSpieler , int aktuellerSpieler ) { } }

Fix:
int spielerPos = zug . getZielPos ( ) ;
Buggy code:
public class Sudoku { private Kentta kentta ; private Ui ui ; private Solver solver ; private Kentta temp ; public Sudoku ( Kentta kentta ) { } public boolean tarkista ( ) { } public void lisaaNumero ( int y , int x , int arvo ) { } public void gui ( ) { } public int getKoko ( ) { } public int getArvo ( int y , int x ) { } public void setArvo ( int y , int x , int arvo ) { } public void uusiKentta ( ) { } private void swapKentat ( ) { } public boolean tarkistaUusiKentta ( ) { <START_BUG> if ( Tarkistaja . validoi ( temp ) ) { <END_BUG> ui . paivita ( ) ; return true ; } return false ; } public boolean ratkaise ( ) { } }

Fix:
if ( Tarkistaja . validoi ( kentta ) ) {
Buggy code:
public class DeferredTreeContentManager { ITreeContentProvider contentProvider ; PendingUpdateAdapter placeholder = null ; AbstractTreeViewer treeViewer ; public DeferredTreeContentManager ( ITreeContentProvider provider , AbstractTreeViewer viewer ) { } public boolean mayHaveChildren ( Object element ) { } public Object [ ] getChildren ( final Object parent ) { } private IDeferredWorkbenchAdapter getAdapter ( Object element ) { } private void startFetchingDeferredChildren ( final Object parent , final IDeferredWorkbenchAdapter adapter ) { final IElementCollector collector = new IElementCollector ( ) { public void add ( Object element , IProgressMonitor monitor ) { add ( new Object [ ] { element } , monitor ) ; } public void add ( Object [ ] elements , IProgressMonitor monitor ) { addChildren ( parent , elements , monitor ) ; } } ; Platform . getJobManager ( ) . cancel ( parent ) ; <START_BUG> Job job = new Job ( ProgressMessages . getString ( "DeferredTreeContentManager.FetchChildrenJob" ) ) { <END_BUG> public IStatus run ( IProgressMonitor monitor ) { try { adapter . fetchDeferredChildren ( parent , collector , monitor ) ; } catch ( OperationCanceledException e ) { return Status . CANCEL_STATUS ; } return Status . OK_STATUS ; } public boolean belongsTo ( Object family ) { return parent . equals ( family ) ; } } ; job . setRule ( adapter . getRule ( ) ) ; job . schedule ( ) ; } private void addChildren ( final Object parent , final Object [ ] children , IProgressMonitor monitor ) { } public boolean isDeferredAdapter ( Object element ) { } }

Fix:
Job job = new Job ( adapter . getLabel ( parent ) ) {
Buggy code:
public abstract class Manipulator implements Manipulation { private static final Logger log = LoggerFactory . getLogger ( Manipulator . class ) ; private OperationType type = OperationType . Manipulator ; private Source source ; private String matcher ; private Manipulator successor ; @ Override public final void execute ( Source source ) { this . source = source ; String result = performExtraction ( ) ; if ( result == null ) { throw new IllegalStateException ( ( ( "Manipulator<seq2seq4repair_space>" + ( this . getClass ( ) . getName ( ) ) ) + "<seq2seq4repair_space>returned<seq2seq4repair_space>null." ) ) ; } if ( ( type ) == ( OperationType . Manipulator ) ) { Manipulator . log . debug ( "reassigning<seq2seq4repair_space>source.." ) ; Source newSource = new Source ( result ) ; newSource . fullSequentialParse ( ) ; this . source = newSource ; } if ( ( successor ) != null ) { <START_BUG> successor . execute ( source ) ; <END_BUG> } } public abstract String performExtraction ( ) { } public OperationType getType ( ) { } protected void setType ( OperationType type ) { } public Source getSource ( ) { } public Manipulator getSuccessor ( ) { } public void setSuccessor ( Manipulator successor ) { } public String getMatcher ( ) { } public boolean hasMatcher ( ) { } public abstract void setMatcher ( String matcher ) { } }

Fix:
successor . execute ( this . source ) ;
Buggy code:
public class roundFinished extends ActionBarActivity { private GameLogic gl ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_round_finished ) ; gl = GameLogic . getInstance ( ) ; List < Group > groups = gl . getAllGroups ( ) ; for ( Group curGroup : groups ) { <START_BUG> LinearLayout curLayout = ( ( LinearLayout ) ( findViewById ( roundFinished_activity ) ) ) ; <END_BUG> TextView tv = new TextView ( this ) ; int sumLastRound = 0 ; for ( int i : curGroup . getPointsLastRound ( ) ) sumLastRound += i ; tv . setText ( ( ( ( ( ( "Gruppe<seq2seq4repair_space>" + ( curGroup . getId ( ) ) ) + ":<seq2seq4repair_space>" ) + ( curGroup . getTotalPoints ( ) ) ) + "<seq2seq4repair_space>+<seq2seq4repair_space>" ) + sumLastRound ) ) ; LinearLayout . LayoutParams lp = new LinearLayout . LayoutParams ( LayoutParams . MATCH_PARENT , LayoutParams . WRAP_CONTENT ) ; tv . setLayoutParams ( lp ) ; curLayout . addView ( tv , ( 2 + ( curGroup . getId ( ) ) ) ) ; } } public void continueGame ( View view ) { } public void endGame ( View view ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
LinearLayout curLayout = ( ( LinearLayout ) ( findViewById ( R . id . roundFinished ) ) ) ;
Buggy code:
public class ImageMosaicJDBCFormat extends AbstractGridFormat implements Format { private static final Logger LOGGER = Logging . getLogger ( ImageMosaicJDBCFormat . class . getPackage ( ) . getName ( ) ) ; public static final ParameterDescriptor < Color > OUTPUT_TRANSPARENT_COLOR = new org . geotools . parameter . DefaultParameterDescriptor < Color > ( "OutputTransparentColor" , Color . class , null , null ) ; public ImageMosaicJDBCFormat ( ) { } public static URL getURLFromSource ( Object source ) { } private void setInfo ( ) { HashMap < String , String > info = new HashMap < String , String > ( ) ; info . put ( "name" , "ImageMosaicJDBC" ) ; info . put ( "description" , "Image<seq2seq4repair_space>mosaicking//pyramidal<seq2seq4repair_space>jdbc<seq2seq4repair_space>plugin" ) ; info . put ( "vendor" , "Geotools" ) ; info . put ( "docURL" , "" ) ; info . put ( "version" , "1.0" ) ; mInfo = info ; <START_BUG> readParameters = new ParameterGroup ( new org . geotools . parameter . DefaultParameterDescriptorGroup ( mInfo , new GeneralParameterDescriptor [ ] { READ_GRIDGEOMETRY2D , ImageMosaicJDBCFormat . OUTPUT_TRANSPARENT_COLOR , BACKGROUND_COLOR } ) ) ; <END_BUG> writeParameters = null ; } @ Override public ImageMosaicJDBCReader getReader ( Object source ) { } @ Override public GridCoverageWriter getWriter ( Object destination ) { } @ Override public boolean accepts ( Object source , Hints hints ) { } @ Override public ImageMosaicJDBCReader getReader ( Object source , Hints hints ) { } @ Override public GeoToolsWriteParams getDefaultImageIOWriteParameters ( ) { } @ Override public GridCoverageWriter getWriter ( Object destination , Hints hints ) { } }

Fix:
readParameters = new ParameterGroup ( new org . geotools . parameter . DefaultParameterDescriptorGroup ( mInfo , new GeneralParameterDescriptor [ ] { READ_GRIDGEOMETRY2D , ImageMosaicJDBCFormat . OUTPUT_TRANSPARENT_COLOR , BACKGROUND_COLOR , TIME } ) ) ;
Buggy code:
public interface IActionService { <START_BUG> void addAction ( String commandId , IAction action ) ; <END_BUG> void addActionServiceListener ( IActionServiceListener actionServiceListener ) { } SortedMap getActionsById ( ) { } void removeAction ( String commandId ) { } void removeActionServiceListener ( IActionServiceListener actionServiceListener ) { } }

Fix:
void addAction ( String commandId , IHandler action ) ;
Buggy code:
@ WebServlet ( "//playoff//ChooseBracketSort" ) public class ChooseBracketSort extends BaseFLLServlet { public static void populateContext ( final PageContext pageContext ) { } protected void processRequest ( final HttpServletRequest request , final HttpServletResponse response , final ServletContext application , final HttpSession session ) throws IOException , ServletException { final PlayoffSessionData data = SessionAttributes . getNonNullAttribute ( session , SESSION_DATA , PlayoffSessionData . class ) ; final String sortStr = request . getParameter ( "sort" ) ; <START_BUG> if ( ( null == sortStr ) || ( "" == sortStr ) ) { <END_BUG> throw new FLLRuntimeException ( "Missing<seq2seq4repair_space>parameter<seq2seq4repair_space>'sort'" ) ; } final BracketSortType sort = BracketSortType . valueOf ( sortStr ) ; data . setSort ( sort ) ; session . setAttribute ( SESSION_DATA , data ) ; response . sendRedirect ( response . encodeRedirectURL ( "InitializeBrackets" ) ) ; } }

Fix:
if ( ( null == sortStr ) || ( "" . equals ( sortStr ) ) ) {
Buggy code:
public class KeyStream extends AbstractStream { private Map < String , Node > keyMap ; private int nextNodeToAssign ; public KeyStream ( String destProcessor , String srcProcessor , List < Node > nodes , CommManager commManager ) { } @ Override protected Node getNode ( Event event ) { if ( ! ( this . keyMap . containsKey ( event . getKey ( ) ) ) ) { <START_BUG> synchronized ( this . keyMap ) { <END_BUG> if ( ! ( this . keyMap . containsKey ( event . getKey ( ) ) ) ) { this . keyMap . put ( event . getKey ( ) , this . nodes . get ( this . nextNodeToAssign ) ) ; this . nextNodeToAssign = ( ( this . nextNodeToAssign ) + 1 ) % ( this . nodes . size ( ) ) ; } } } return this . keyMap . get ( event . getKey ( ) ) ; } public synchronized void nodeFailed ( Node node ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class RaDeploymentParsingProcessor implements DeploymentUnitProcessor { public RaDeploymentParsingProcessor ( ) { } @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { <START_BUG> final VirtualFile deploymentRoot = phaseContext . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; <END_BUG> if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) return ; final String deploymentRootName = deploymentRoot . getName ( ) ; if ( ! ( deploymentRootName . endsWith ( ".rar" ) ) ) { return ; } VirtualFile serviceXmlFile = deploymentRoot . getChild ( "//META-INF//ra.xml" ) ; InputStream xmlStream = null ; Connector result = null ; try { if ( ( serviceXmlFile != null ) && ( serviceXmlFile . exists ( ) ) ) { xmlStream = serviceXmlFile . openStream ( ) ; result = new RaParser ( ) . parse ( xmlStream ) ; if ( result == null ) throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>service<seq2seq4repair_space>xml<seq2seq4repair_space>[" + serviceXmlFile ) + "]" ) ) ; } File root = deploymentRoot . getPhysicalFile ( ) ; URL url = root . toURI ( ) . toURL ( ) ; String deploymentName = deploymentRoot . getName ( ) . substring ( 0 , deploymentRoot . getName ( ) . indexOf ( ".rar" ) ) ; ConnectorXmlDescriptor xmlDescriptor = new ConnectorXmlDescriptor ( result , root , url , deploymentName ) ; phaseContext . getDeploymentUnit ( ) . putAttachment ( ATTACHMENT_KEY , xmlDescriptor ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>service<seq2seq4repair_space>xml<seq2seq4repair_space>[" + serviceXmlFile ) + "]" ) , e ) ; } finally { VFSUtils . safeClose ( xmlStream ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
final VirtualFile deploymentRoot = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ;